Reverse order of decorator-injected initializers (#54269)

This commit is contained in:
Ron Buckton
2023-05-17 17:12:13 -04:00
committed by GitHub
parent dddd0667f0
commit b14264a2eb
11 changed files with 58 additions and 28 deletions

View File

@@ -761,10 +761,10 @@ export const esDecorateHelper: UnscopedEmitHelper = {
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.push(_);
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.push(_);
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}