Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created August 14, 2018 01:49
Show Gist options
  • Save jwoertink/8ee51b64a592fe67bd74b30bc6588b7c to your computer and use it in GitHub Desktop.
Save jwoertink/8ee51b64a592fe67bd74b30bc6588b7c to your computer and use it in GitHub Desktop.
// can't use SomeLib here unless I require it in this file
// even if I run my program from main.js
class A extends SomeLib {
}
module.exports = A
class A
# this works because it's required in main.rb
include SomeLib
end
const SomeLib = require('some_lib');
const A = require('./a');
SomeLib.whatever();
new A();
require "some_lib"
require "./a"
# this works
SomeLib.whatever
A.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment