From afa7273e3dc2672972b8091065795a18b8bbbe06 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 21 Sep 2022 16:38:16 -0600 Subject: [PATCH] [FEATURE beta] Update to Ember 4.8 --- package.json | 2 +- packages/@ember/-internals/glimmer/lib/helper.ts | 5 ++++- packages/@ember/-internals/metal/lib/libraries.ts | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 77f0e11f918..34d42a657f4 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "simple-dom": "^1.4.0", "testem": "^3.8.0", "testem-failure-only-reporter": "^1.0.0", - "typescript": "~4.6.4" + "typescript": "~4.8.3" }, "peerDependencies": { "@glimmer/component": "^1.1.2" diff --git a/packages/@ember/-internals/glimmer/lib/helper.ts b/packages/@ember/-internals/glimmer/lib/helper.ts index 9f720559e17..1f3483af9b1 100644 --- a/packages/@ember/-internals/glimmer/lib/helper.ts +++ b/packages/@ember/-internals/glimmer/lib/helper.ts @@ -105,7 +105,10 @@ class Helper extends FrameworkObject { static isHelperFactory = true; static [IS_CLASSIC_HELPER] = true; - [RECOMPUTE_TAG]: DirtyableTag; + // SAFETY: this is initialized in `init`, rather than `constructor`. It is + // safe to `declare` like this *if and only if* nothing uses the constructor + // directly in this class, since nothing else can run before `init`. + declare [RECOMPUTE_TAG]: DirtyableTag; init(properties: object | undefined) { super.init(properties); diff --git a/packages/@ember/-internals/metal/lib/libraries.ts b/packages/@ember/-internals/metal/lib/libraries.ts index d96ca2adf89..3b19532fc5b 100644 --- a/packages/@ember/-internals/metal/lib/libraries.ts +++ b/packages/@ember/-internals/metal/lib/libraries.ts @@ -86,7 +86,7 @@ if (DEBUG) { let nameLengths = libs.map((item) => get(item, 'name.length')); assert( 'nameLengths is number array', - nameLengths instanceof Array && nameLengths.every((n) => typeof n === 'number') + nameLengths instanceof Array && nameLengths.every((n): n is number => typeof n === 'number') ); let maxNameLength = Math.max.apply(null, nameLengths); diff --git a/yarn.lock b/yarn.lock index 9d217f1714b..c70261ec986 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10262,10 +10262,10 @@ typescript-memoize@^1.0.0-alpha.3, typescript-memoize@^1.0.1: resolved "https://registry.yarnpkg.com/typescript-memoize/-/typescript-memoize-1.1.0.tgz#4a8f512d06fc995167c703a3592219901db8bc79" integrity sha512-LQPKVXK8QrBBkL/zclE6YgSWn0I8ew5m0Lf+XL00IwMhlotqRLlzHV+BRrljVQIc+NohUAuQP7mg4HQwrx5Xbg== -typescript@~4.6.4: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@~4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" + integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== uc.micro@^1.0.0, uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6"