-
-
Save jwoertink/8ee51b64a592fe67bd74b30bc6588b7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
# this works because it's required in main.rb | |
include SomeLib | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SomeLib = require('some_lib'); | |
const A = require('./a'); | |
SomeLib.whatever(); | |
new A(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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