Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // A.js
- //
- var A = (function () {
- function A(name) {
- this.name = name;
- }
- return A;
- })();
- module.exports = A;
- //
- // B.js
- //
- var __extends = this.__extends || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- __.prototype = b.prototype;
- d.prototype = new __();
- };
- var A = require('./A');
- var C = require('./C');
- var B = (function (_super) {
- __extends(B, _super);
- function B(value) {
- _super.call(this, value);
- }
- B.factory = function () {
- var a = new C();
- return a;
- };
- return B;
- })(A);
- module.exports = B;
- //
- // C.js
- //
- var __extends = this.__extends || function (d, b) {
- for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
- function __() { this.constructor = d; }
- __.prototype = b.prototype;
- d.prototype = new __();
- };
- var B = require('./B');
- var C = (function (_super) {
- __extends(C, _super);
- function C() {
- _super.call(this, "C");
- }
- return C;
- })(B);
- module.exports = C;
- //
- // Test.js
- //
- var B = require('./B');
- var Test = (function () {
- function Test() {
- }
- Test.test = function () {
- return B.factory();
- };
- return Test;
- })();
- module.exports = Test;
- //
- // app.js
- //
- var Test = require('./Test');
- Test.test();
Add Comment
Please, Sign In to add comment