-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
TypeScript outputs AMD that looks like this:
define("SomeModule", ["require", "exports"], function(n, t) {
var i, r, u;
(function(n) {
n[n.Unknown = 0] = "Unknown";
})(t.ContextHostType || (t.ContextHostType = {}));
});I don't know why it takes require itself as a dependency, but it should work.
AMDClean is pretending that dependency doesn't exist though and providing bad output:
;(function() {
var SomeModule = {};
SomeModule = function (n, t) {
var i, r, u;
(function (n) {
n[n.Unknown = 0] = 'Unknown';
}(t.ContextHostType || (t.ContextHostType = {})));
}(SomeModule);
}());This blows up on t.ContextHostType, because n is the empty object that represents the exports, not t. I guess the right output would be to have the function take only one parameter?
You can see it here
Metadata
Metadata
Assignees
Labels
No labels