You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (var i = decorators.length - 1; i >= 0; i--) {
655
655
var context = {};
656
656
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
657
657
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
658
-
context.addInitializer = function (f) { extraInitializers.push(f); };
658
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
659
659
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
660
660
if (kind === "accessor") {
661
-
if (!result) continue;
661
+
if (result === void 0) continue;
662
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
662
663
if (_ = accept(result.get)) descriptor.get = _;
663
664
if (_ = accept(result.set)) descriptor.set = _;
664
665
if (_ = accept(result.init)) initializers.push(_);
@@ -668,7 +669,8 @@ namespace ts {
668
669
else descriptor[key] = _;
669
670
}
670
671
}
671
-
if (target) Object.defineProperty(target, contextIn.key, descriptor);
672
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
0 commit comments