From 24208783c9b0aa0ed426d9467df5c6104df26992 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 May 2023 17:11:05 -0400 Subject: [PATCH 1/2] Reverse order of decorator-injected initializers --- tslib.es6.js | 4 ++-- tslib.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tslib.es6.js b/tslib.es6.js index 1acdae0..85f4b7c 100644 --- a/tslib.es6.js +++ b/tslib.es6.js @@ -80,10 +80,10 @@ export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initiali 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] = _; } } diff --git a/tslib.js b/tslib.js index 0f0e892..0505ac6 100644 --- a/tslib.js +++ b/tslib.js @@ -126,10 +126,10 @@ var __createBinding; 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] = _; } } From aa3d3c270c435ba616b4b07f20448eaa15171163 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 17 May 2023 18:05:30 -0400 Subject: [PATCH 2/2] Bump patch version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1481574..8009be6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "tslib", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "2.5.0", + "version": "2.5.1", "license": "0BSD", "description": "Runtime library for TypeScript helper functions", "keywords": [