-
-
Save spion/3826945 to your computer and use it in GitHub Desktop.
typescript module fail
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
import B = module("b"); | |
class A extends B.B { | |
g(): number { return super.f(); } | |
}; |
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
export class B { | |
f():number { return 1; } | |
}; |
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
//577 % cat a.js var __extends = this.__extends || function (d, b) { | |
function __() { this.constructor = d; } | |
__.prototype = b.prototype; | |
d.prototype = new __(); | |
} | |
define(["require", "exports", "b"], function(require, exports, __B__) { | |
var B = __B__; | |
var A = (function (_super) { | |
__extends(A, _super); | |
function A() { | |
_super.apply(this, arguments); | |
} | |
A.prototype.g = function () { | |
return _super.prototype.f.call(this); | |
}; | |
return A; | |
})(B.B); | |
; ; | |
}) | |
//578 % cat b.js define(["require", "exports"], function(require, exports) { | |
var B = (function () { | |
function B() { } | |
B.prototype.f = function () { | |
return 1; | |
}; | |
return B; | |
})(); | |
exports.B = B; | |
; ; | |
}) |
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
552 % tsc a.ts --out a.js | |
/home/spion/Documents/tests/typescript/a.ts(1,0): Module emit collides with emitted script: /home/spion/Documents/tests/typescript/a.js | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@lhk if you use another name for the outputted js it will compile, but it won't put anything in the file. The problem seems to be that you can't use import statements and concat all your JS with typescript. To get them to concat, you have to use tags everywhere.