Skip to content

Instantly share code, notes, and snippets.

@alejandrolechuga
Created March 17, 2019 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alejandrolechuga/711cf28a5412e9914350c41b6fbe2c83 to your computer and use it in GitHub Desktop.
Save alejandrolechuga/711cf28a5412e9914350c41b6fbe2c83 to your computer and use it in GitHub Desktop.
((function (global) {
class A {
constructor() {
console.log('soy clase A');
}
}
global.A = A;
}(this));
((function (global) {
class B {
constructor() {
console.log('soy clase A');
}
}
global.B = B;
}(this));
((function (global) {
const A = global.A;
const B = global.B;
class Main {
constructor() {
this.instanciaA = new A();
this.instanciaB = new B();
}
}
new Main();
}(this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment