Skip to content

Commit 91fcbd0

Browse files
authoredMay 17, 2023
Reverse order of decorator-injected initializers (#202)
* Reverse order of decorator-injected initializers * Bump patch version
1 parent eab3cff commit 91fcbd0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "tslib",
33
"author": "Microsoft Corp.",
44
"homepage": "https://www.typescriptlang.org/",
5-
"version": "2.5.0",
5+
"version": "2.5.1",
66
"license": "0BSD",
77
"description": "Runtime library for TypeScript helper functions",
88
"keywords": [

‎tslib.es6.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initiali
8080
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
8181
if (_ = accept(result.get)) descriptor.get = _;
8282
if (_ = accept(result.set)) descriptor.set = _;
83-
if (_ = accept(result.init)) initializers.push(_);
83+
if (_ = accept(result.init)) initializers.unshift(_);
8484
}
8585
else if (_ = accept(result)) {
86-
if (kind === "field") initializers.push(_);
86+
if (kind === "field") initializers.unshift(_);
8787
else descriptor[key] = _;
8888
}
8989
}

‎tslib.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ var __createBinding;
126126
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
127127
if (_ = accept(result.get)) descriptor.get = _;
128128
if (_ = accept(result.set)) descriptor.set = _;
129-
if (_ = accept(result.init)) initializers.push(_);
129+
if (_ = accept(result.init)) initializers.unshift(_);
130130
}
131131
else if (_ = accept(result)) {
132-
if (kind === "field") initializers.push(_);
132+
if (kind === "field") initializers.unshift(_);
133133
else descriptor[key] = _;
134134
}
135135
}

0 commit comments

Comments
 (0)
Please sign in to comment.