diff --git a/.eslintignore b/.eslintignore index 7ce02292986..d619eb5c112 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,4 +7,4 @@ dist/ tmp/ smoke-tests/ types/ -type-tests/preview +type-tests/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0515ad5341..d240cd0300e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,10 @@ jobs: cache: yarn - name: install dependencies run: yarn install --frozen-lockfile --non-interactive - - name: Check types - run: yarn type-check + - name: build stable type definitions + run: yarn build:types + - name: Check published types + run: yarn type-check:types types-range: name: Type Checking (other supported versions) @@ -61,10 +63,12 @@ jobs: cache: yarn - name: install dependencies run: yarn install --frozen-lockfile --non-interactive + - name: build stable type definitions + run: yarn build:types - name: install TS@${{matrix.ts-version}} run: yarn add -D typescript@${{ matrix.ts-version }} - - name: Check types with TS@${{matrix.ts-version}} - run: yarn type-check + - name: Check published types with TS@${{matrix.ts-version}} + run: yarn type-check:types basic-test: name: Debug and Prebuilt (All Tests by Package + Canary Features) diff --git a/package.json b/package.json index 1202ccd4d89..d0ff8f275ab 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,10 @@ "url": "git+https://github.com/emberjs/ember.js.git" }, "scripts": { - "build": "ember build --environment production", + "build:js": "ember build --environment production", + "build:types": "node types/publish.mjs", + "build": "npm-run-all build:*", "docs": "ember ember-cli-yuidoc", - "types": "node types/publish.mjs", "link:glimmer": "node bin/yarn-link-glimmer.js", "start": "ember serve", "lint": "npm-run-all --continue-on-error --aggregate-output --parallel \"lint:!(fix)\"", @@ -49,8 +50,8 @@ "test:blueprints": "yarn test:blueprints:js && yarn test:blueprints:ts", "test:node": "qunit tests/node/**/*-test.js", "test:browserstack": "node bin/run-browserstack-tests.js", - "type-check:stable": "tsc --noEmit", - "type-check:preview": "tsc --noEmit --project type-tests/preview", + "type-check:internals": "tsc --noEmit", + "type-check:types": "tsc --noEmit --project type-tests", "type-check": "npm-run-all type-check:*" }, "dependencies": { diff --git a/packages/@ember/owner/index.ts b/packages/@ember/owner/index.ts index 2751e105a4b..25f6d58efbc 100644 --- a/packages/@ember/owner/index.ts +++ b/packages/@ember/owner/index.ts @@ -33,7 +33,7 @@ // We need to provide a narrower public interface to `getOwner` so that we only // expose the `Owner` type, *not* our richer `InternalOwner` type and its // various bits of private API. -import Owner, { getOwner as internalGetOwner } from '../-internals/owner'; +import Owner, { getOwner as internalGetOwner } from '@ember/-internals/owner'; // NOTE: this documentation appears here instead of at the definition site so // it can appear correctly in both API docs and for TS, while providing a richer @@ -99,4 +99,4 @@ export { KnownForTypeResult, Resolver, DIRegistry, -} from '../-internals/owner'; +} from '@ember/-internals/owner'; diff --git a/type-tests/preview/@ember/application-test/application-instance.ts b/type-tests/@ember/application-test/application-instance.ts similarity index 100% rename from type-tests/preview/@ember/application-test/application-instance.ts rename to type-tests/@ember/application-test/application-instance.ts diff --git a/type-tests/preview/@ember/application-test/application.ts b/type-tests/@ember/application-test/application.ts similarity index 100% rename from type-tests/preview/@ember/application-test/application.ts rename to type-tests/@ember/application-test/application.ts diff --git a/type-tests/preview/@ember/application-test/index.ts b/type-tests/@ember/application-test/index.ts similarity index 81% rename from type-tests/preview/@ember/application-test/index.ts rename to type-tests/@ember/application-test/index.ts index 04973e7f309..78ea2bf2c8d 100644 --- a/type-tests/preview/@ember/application-test/index.ts +++ b/type-tests/@ember/application-test/index.ts @@ -4,6 +4,10 @@ import Owner from '@ember/owner'; import ApplicationInstance from '@ember/application/instance'; import Service from '@ember/service'; import { expectTypeOf } from 'expect-type'; +import { getOwner as getOwnerProper, setOwner as setOwnerProper } from '@ember/owner'; + +expectTypeOf(getOwner).toEqualTypeOf(getOwnerProper); +expectTypeOf(setOwner).toEqualTypeOf(setOwnerProper); expectTypeOf(getOwner({})).toEqualTypeOf(); diff --git a/type-tests/preview/@ember/array-test/array-proxy.ts b/type-tests/@ember/array-test/array-proxy.ts similarity index 100% rename from type-tests/preview/@ember/array-test/array-proxy.ts rename to type-tests/@ember/array-test/array-proxy.ts diff --git a/type-tests/preview/@ember/array-test/array.ts b/type-tests/@ember/array-test/array.ts similarity index 100% rename from type-tests/preview/@ember/array-test/array.ts rename to type-tests/@ember/array-test/array.ts diff --git a/type-tests/preview/@ember/component-test/built-ins.ts b/type-tests/@ember/component-test/built-ins.ts similarity index 100% rename from type-tests/preview/@ember/component-test/built-ins.ts rename to type-tests/@ember/component-test/built-ins.ts diff --git a/type-tests/preview/@ember/component-test/capabilities.ts b/type-tests/@ember/component-test/capabilities.ts similarity index 100% rename from type-tests/preview/@ember/component-test/capabilities.ts rename to type-tests/@ember/component-test/capabilities.ts diff --git a/type-tests/preview/@ember/component-test/component.ts b/type-tests/@ember/component-test/component.ts similarity index 100% rename from type-tests/preview/@ember/component-test/component.ts rename to type-tests/@ember/component-test/component.ts diff --git a/type-tests/preview/@ember/component-test/helper.ts b/type-tests/@ember/component-test/helper.ts similarity index 100% rename from type-tests/preview/@ember/component-test/helper.ts rename to type-tests/@ember/component-test/helper.ts diff --git a/type-tests/preview/@ember/component-test/set-component-template.ts b/type-tests/@ember/component-test/set-component-template.ts similarity index 100% rename from type-tests/preview/@ember/component-test/set-component-template.ts rename to type-tests/@ember/component-test/set-component-template.ts diff --git a/type-tests/preview/@ember/component-test/template-only.ts b/type-tests/@ember/component-test/template-only.ts similarity index 100% rename from type-tests/preview/@ember/component-test/template-only.ts rename to type-tests/@ember/component-test/template-only.ts diff --git a/type-tests/preview/@ember/controller-test/main.ts b/type-tests/@ember/controller-test/main.ts similarity index 100% rename from type-tests/preview/@ember/controller-test/main.ts rename to type-tests/@ember/controller-test/main.ts diff --git a/type-tests/preview/@ember/controller-test/octane.ts b/type-tests/@ember/controller-test/octane.ts similarity index 100% rename from type-tests/preview/@ember/controller-test/octane.ts rename to type-tests/@ember/controller-test/octane.ts diff --git a/type-tests/preview/@ember/debug-tests.ts b/type-tests/@ember/debug-tests.ts similarity index 100% rename from type-tests/preview/@ember/debug-tests.ts rename to type-tests/@ember/debug-tests.ts diff --git a/type-tests/preview/@ember/destroyable-test.ts b/type-tests/@ember/destroyable-test.ts similarity index 100% rename from type-tests/preview/@ember/destroyable-test.ts rename to type-tests/@ember/destroyable-test.ts diff --git a/type-tests/preview/@ember/engine-test/engine-instance.ts b/type-tests/@ember/engine-test/engine-instance.ts similarity index 100% rename from type-tests/preview/@ember/engine-test/engine-instance.ts rename to type-tests/@ember/engine-test/engine-instance.ts diff --git a/type-tests/preview/@ember/engine-test/engine.ts b/type-tests/@ember/engine-test/engine.ts similarity index 100% rename from type-tests/preview/@ember/engine-test/engine.ts rename to type-tests/@ember/engine-test/engine.ts diff --git a/type-tests/preview/@ember/error-tests.ts b/type-tests/@ember/error-tests.ts similarity index 100% rename from type-tests/preview/@ember/error-tests.ts rename to type-tests/@ember/error-tests.ts diff --git a/type-tests/preview/@ember/helper-tests.ts b/type-tests/@ember/helper-tests.ts similarity index 100% rename from type-tests/preview/@ember/helper-tests.ts rename to type-tests/@ember/helper-tests.ts diff --git a/type-tests/preview/@ember/modifier-tests.ts b/type-tests/@ember/modifier-tests.ts similarity index 100% rename from type-tests/preview/@ember/modifier-tests.ts rename to type-tests/@ember/modifier-tests.ts diff --git a/type-tests/preview/@ember/object-test/compat.ts b/type-tests/@ember/object-test/compat.ts similarity index 100% rename from type-tests/preview/@ember/object-test/compat.ts rename to type-tests/@ember/object-test/compat.ts diff --git a/type-tests/preview/@ember/object-test/computed.ts b/type-tests/@ember/object-test/computed.ts similarity index 100% rename from type-tests/preview/@ember/object-test/computed.ts rename to type-tests/@ember/object-test/computed.ts diff --git a/type-tests/preview/@ember/object-test/core.ts b/type-tests/@ember/object-test/core.ts similarity index 100% rename from type-tests/preview/@ember/object-test/core.ts rename to type-tests/@ember/object-test/core.ts diff --git a/type-tests/preview/@ember/object-test/create-negative.ts b/type-tests/@ember/object-test/create-negative.ts similarity index 100% rename from type-tests/preview/@ember/object-test/create-negative.ts rename to type-tests/@ember/object-test/create-negative.ts diff --git a/type-tests/preview/@ember/object-test/create.ts b/type-tests/@ember/object-test/create.ts similarity index 100% rename from type-tests/preview/@ember/object-test/create.ts rename to type-tests/@ember/object-test/create.ts diff --git a/type-tests/preview/@ember/object-test/event.ts b/type-tests/@ember/object-test/event.ts similarity index 100% rename from type-tests/preview/@ember/object-test/event.ts rename to type-tests/@ember/object-test/event.ts diff --git a/type-tests/preview/@ember/object-test/extend.ts b/type-tests/@ember/object-test/extend.ts similarity index 100% rename from type-tests/preview/@ember/object-test/extend.ts rename to type-tests/@ember/object-test/extend.ts diff --git a/type-tests/preview/@ember/object-test/get-set.ts b/type-tests/@ember/object-test/get-set.ts similarity index 100% rename from type-tests/preview/@ember/object-test/get-set.ts rename to type-tests/@ember/object-test/get-set.ts diff --git a/type-tests/preview/@ember/object-test/internals.ts b/type-tests/@ember/object-test/internals.ts similarity index 100% rename from type-tests/preview/@ember/object-test/internals.ts rename to type-tests/@ember/object-test/internals.ts diff --git a/type-tests/preview/@ember/object-test/object.ts b/type-tests/@ember/object-test/object.ts similarity index 100% rename from type-tests/preview/@ember/object-test/object.ts rename to type-tests/@ember/object-test/object.ts diff --git a/type-tests/preview/@ember/object-test/observable.ts b/type-tests/@ember/object-test/observable.ts similarity index 100% rename from type-tests/preview/@ember/object-test/observable.ts rename to type-tests/@ember/object-test/observable.ts diff --git a/type-tests/preview/@ember/object-test/proxy.ts b/type-tests/@ember/object-test/proxy.ts similarity index 100% rename from type-tests/preview/@ember/object-test/proxy.ts rename to type-tests/@ember/object-test/proxy.ts diff --git a/type-tests/preview/@ember/object-test/reopen.ts b/type-tests/@ember/object-test/reopen.ts similarity index 100% rename from type-tests/preview/@ember/object-test/reopen.ts rename to type-tests/@ember/object-test/reopen.ts diff --git a/type-tests/preview/@ember/owner-tests.ts b/type-tests/@ember/owner-tests.ts similarity index 97% rename from type-tests/preview/@ember/owner-tests.ts rename to type-tests/@ember/owner-tests.ts index 532a1455bf4..e210bfde9ce 100644 --- a/type-tests/preview/@ember/owner-tests.ts +++ b/type-tests/@ember/owner-tests.ts @@ -10,13 +10,6 @@ import Owner, { } from '@ember/owner'; import Component from '@glimmer/component'; import { expectTypeOf } from 'expect-type'; -import { - getOwner as getOwnerApplication, - setOwner as setOwnerApplication, -} from '@ember/application'; - -expectTypeOf(getOwnerApplication).toEqualTypeOf(getOwner); -expectTypeOf(setOwnerApplication).toEqualTypeOf(setOwner); // Just a class we can construct in the Factory and FactoryManager tests declare class ConstructThis { diff --git a/type-tests/preview/@ember/polyfills-tests.ts b/type-tests/@ember/polyfills-tests.ts similarity index 100% rename from type-tests/preview/@ember/polyfills-tests.ts rename to type-tests/@ember/polyfills-tests.ts diff --git a/type-tests/preview/@ember/routing-test/built-ins.ts b/type-tests/@ember/routing-test/built-ins.ts similarity index 100% rename from type-tests/preview/@ember/routing-test/built-ins.ts rename to type-tests/@ember/routing-test/built-ins.ts diff --git a/type-tests/preview/@ember/routing-test/route.ts b/type-tests/@ember/routing-test/route.ts similarity index 100% rename from type-tests/preview/@ember/routing-test/route.ts rename to type-tests/@ember/routing-test/route.ts diff --git a/type-tests/preview/@ember/routing-test/router-service.ts b/type-tests/@ember/routing-test/router-service.ts similarity index 100% rename from type-tests/preview/@ember/routing-test/router-service.ts rename to type-tests/@ember/routing-test/router-service.ts diff --git a/type-tests/preview/@ember/routing-test/router.ts b/type-tests/@ember/routing-test/router.ts similarity index 100% rename from type-tests/preview/@ember/routing-test/router.ts rename to type-tests/@ember/routing-test/router.ts diff --git a/type-tests/preview/@ember/runloop-tests.ts b/type-tests/@ember/runloop-tests.ts similarity index 100% rename from type-tests/preview/@ember/runloop-tests.ts rename to type-tests/@ember/runloop-tests.ts diff --git a/type-tests/preview/@ember/service-test.ts b/type-tests/@ember/service-test.ts similarity index 100% rename from type-tests/preview/@ember/service-test.ts rename to type-tests/@ember/service-test.ts diff --git a/type-tests/preview/@ember/string-tests.ts b/type-tests/@ember/string-tests.ts similarity index 100% rename from type-tests/preview/@ember/string-tests.ts rename to type-tests/@ember/string-tests.ts diff --git a/type-tests/preview/@ember/template-tests.ts b/type-tests/@ember/template-tests.ts similarity index 100% rename from type-tests/preview/@ember/template-tests.ts rename to type-tests/@ember/template-tests.ts diff --git a/type-tests/preview/@ember/test-tests.ts b/type-tests/@ember/test-tests.ts similarity index 100% rename from type-tests/preview/@ember/test-tests.ts rename to type-tests/@ember/test-tests.ts diff --git a/type-tests/preview/@ember/utils-tests.ts b/type-tests/@ember/utils-tests.ts similarity index 100% rename from type-tests/preview/@ember/utils-tests.ts rename to type-tests/@ember/utils-tests.ts diff --git a/type-tests/preview/ember/application-instance.ts b/type-tests/ember/application-instance.ts similarity index 100% rename from type-tests/preview/ember/application-instance.ts rename to type-tests/ember/application-instance.ts diff --git a/type-tests/preview/ember/application.ts b/type-tests/ember/application.ts similarity index 100% rename from type-tests/preview/ember/application.ts rename to type-tests/ember/application.ts diff --git a/type-tests/preview/ember/array-proxy.ts b/type-tests/ember/array-proxy.ts similarity index 100% rename from type-tests/preview/ember/array-proxy.ts rename to type-tests/ember/array-proxy.ts diff --git a/type-tests/preview/ember/array.ts b/type-tests/ember/array.ts similarity index 100% rename from type-tests/preview/ember/array.ts rename to type-tests/ember/array.ts diff --git a/type-tests/preview/ember/component.ts b/type-tests/ember/component.ts similarity index 100% rename from type-tests/preview/ember/component.ts rename to type-tests/ember/component.ts diff --git a/type-tests/preview/ember/computed.ts b/type-tests/ember/computed.ts similarity index 100% rename from type-tests/preview/ember/computed.ts rename to type-tests/ember/computed.ts diff --git a/type-tests/preview/ember/controller.ts b/type-tests/ember/controller.ts similarity index 100% rename from type-tests/preview/ember/controller.ts rename to type-tests/ember/controller.ts diff --git a/type-tests/preview/ember/core-object.ts b/type-tests/ember/core-object.ts similarity index 100% rename from type-tests/preview/ember/core-object.ts rename to type-tests/ember/core-object.ts diff --git a/type-tests/preview/ember/create-negative.ts b/type-tests/ember/create-negative.ts similarity index 100% rename from type-tests/preview/ember/create-negative.ts rename to type-tests/ember/create-negative.ts diff --git a/type-tests/preview/ember/create.ts b/type-tests/ember/create.ts similarity index 100% rename from type-tests/preview/ember/create.ts rename to type-tests/ember/create.ts diff --git a/type-tests/preview/ember/data-adapter.ts b/type-tests/ember/data-adapter.ts similarity index 100% rename from type-tests/preview/ember/data-adapter.ts rename to type-tests/ember/data-adapter.ts diff --git a/type-tests/preview/ember/debug.ts b/type-tests/ember/debug.ts similarity index 100% rename from type-tests/preview/ember/debug.ts rename to type-tests/ember/debug.ts diff --git a/type-tests/preview/ember/ember-module-tests.ts b/type-tests/ember/ember-module-tests.ts similarity index 100% rename from type-tests/preview/ember/ember-module-tests.ts rename to type-tests/ember/ember-module-tests.ts diff --git a/type-tests/preview/ember/ember-tests.ts b/type-tests/ember/ember-tests.ts similarity index 100% rename from type-tests/preview/ember/ember-tests.ts rename to type-tests/ember/ember-tests.ts diff --git a/type-tests/preview/ember/engine-instance.ts b/type-tests/ember/engine-instance.ts similarity index 100% rename from type-tests/preview/ember/engine-instance.ts rename to type-tests/ember/engine-instance.ts diff --git a/type-tests/preview/ember/engine.ts b/type-tests/ember/engine.ts similarity index 100% rename from type-tests/preview/ember/engine.ts rename to type-tests/ember/engine.ts diff --git a/type-tests/preview/ember/error.ts b/type-tests/ember/error.ts similarity index 100% rename from type-tests/preview/ember/error.ts rename to type-tests/ember/error.ts diff --git a/type-tests/preview/ember/event.ts b/type-tests/ember/event.ts similarity index 100% rename from type-tests/preview/ember/event.ts rename to type-tests/ember/event.ts diff --git a/type-tests/preview/ember/extend.ts b/type-tests/ember/extend.ts similarity index 100% rename from type-tests/preview/ember/extend.ts rename to type-tests/ember/extend.ts diff --git a/type-tests/preview/ember/helper.ts b/type-tests/ember/helper.ts similarity index 100% rename from type-tests/preview/ember/helper.ts rename to type-tests/ember/helper.ts diff --git a/type-tests/preview/ember/inject.ts b/type-tests/ember/inject.ts similarity index 100% rename from type-tests/preview/ember/inject.ts rename to type-tests/ember/inject.ts diff --git a/type-tests/preview/ember/mixin.ts b/type-tests/ember/mixin.ts similarity index 100% rename from type-tests/preview/ember/mixin.ts rename to type-tests/ember/mixin.ts diff --git a/type-tests/preview/ember/object.ts b/type-tests/ember/object.ts similarity index 100% rename from type-tests/preview/ember/object.ts rename to type-tests/ember/object.ts diff --git a/type-tests/preview/ember/observable.ts b/type-tests/ember/observable.ts similarity index 100% rename from type-tests/preview/ember/observable.ts rename to type-tests/ember/observable.ts diff --git a/type-tests/preview/ember/private/computed-tests.ts b/type-tests/ember/private/computed-tests.ts similarity index 100% rename from type-tests/preview/ember/private/computed-tests.ts rename to type-tests/ember/private/computed-tests.ts diff --git a/type-tests/preview/ember/private/observable-tests.ts b/type-tests/ember/private/observable-tests.ts similarity index 100% rename from type-tests/preview/ember/private/observable-tests.ts rename to type-tests/ember/private/observable-tests.ts diff --git a/type-tests/preview/ember/reopen.ts b/type-tests/ember/reopen.ts similarity index 100% rename from type-tests/preview/ember/reopen.ts rename to type-tests/ember/reopen.ts diff --git a/type-tests/preview/ember/route.ts b/type-tests/ember/route.ts similarity index 100% rename from type-tests/preview/ember/route.ts rename to type-tests/ember/route.ts diff --git a/type-tests/preview/ember/router.ts b/type-tests/ember/router.ts similarity index 100% rename from type-tests/preview/ember/router.ts rename to type-tests/ember/router.ts diff --git a/type-tests/preview/ember/run.ts b/type-tests/ember/run.ts similarity index 100% rename from type-tests/preview/ember/run.ts rename to type-tests/ember/run.ts diff --git a/type-tests/preview/ember/string.ts b/type-tests/ember/string.ts similarity index 100% rename from type-tests/preview/ember/string.ts rename to type-tests/ember/string.ts diff --git a/type-tests/preview/ember/techniques/properties-from-this.ts b/type-tests/ember/techniques/properties-from-this.ts similarity index 100% rename from type-tests/preview/ember/techniques/properties-from-this.ts rename to type-tests/ember/techniques/properties-from-this.ts diff --git a/type-tests/preview/ember/test.ts b/type-tests/ember/test.ts similarity index 100% rename from type-tests/preview/ember/test.ts rename to type-tests/ember/test.ts diff --git a/type-tests/preview/ember/transition.ts b/type-tests/ember/transition.ts similarity index 100% rename from type-tests/preview/ember/transition.ts rename to type-tests/ember/transition.ts diff --git a/type-tests/preview/ember/utils.ts b/type-tests/ember/utils.ts similarity index 100% rename from type-tests/preview/ember/utils.ts rename to type-tests/ember/utils.ts diff --git a/type-tests/preview/ember/view-utils.ts b/type-tests/ember/view-utils.ts similarity index 100% rename from type-tests/preview/ember/view-utils.ts rename to type-tests/ember/view-utils.ts diff --git a/type-tests/index.d.ts b/type-tests/index.d.ts new file mode 100644 index 00000000000..32676789226 --- /dev/null +++ b/type-tests/index.d.ts @@ -0,0 +1,3 @@ +// This is equivalent to the import we have end users write. +import '../types/stable'; +import '../types/preview'; diff --git a/type-tests/preview/index.d.ts b/type-tests/preview/index.d.ts deleted file mode 100644 index 6b492f831fb..00000000000 --- a/type-tests/preview/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../types/preview'; diff --git a/type-tests/preview/tsconfig.json b/type-tests/tsconfig.json similarity index 100% rename from type-tests/preview/tsconfig.json rename to type-tests/tsconfig.json diff --git a/types/preview/@ember/application/tsconfig.json b/types/preview/@ember/application/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/application/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/array/tsconfig.json b/types/preview/@ember/array/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/array/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/component/tsconfig.json b/types/preview/@ember/component/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/component/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/controller/tsconfig.json b/types/preview/@ember/controller/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/controller/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/debug/tsconfig.json b/types/preview/@ember/debug/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/debug/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/destroyable/tsconfig.json b/types/preview/@ember/destroyable/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/destroyable/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/engine/-private/container-proxy-mixin.d.ts b/types/preview/@ember/engine/-private/container-proxy-mixin.d.ts index 4831c174436..7c25fedea9d 100644 --- a/types/preview/@ember/engine/-private/container-proxy-mixin.d.ts +++ b/types/preview/@ember/engine/-private/container-proxy-mixin.d.ts @@ -1,5 +1,5 @@ declare module '@ember/engine/-private/container-proxy-mixin' { - import { ContainerProxy } from '@ember/owner'; + import { ContainerProxy } from '@ember/-internals/owner'; import Mixin from '@ember/object/mixin'; /** diff --git a/types/preview/@ember/engine/-private/registry-proxy-mixin.d.ts b/types/preview/@ember/engine/-private/registry-proxy-mixin.d.ts index 65b69f755cb..d3ed9552f88 100644 --- a/types/preview/@ember/engine/-private/registry-proxy-mixin.d.ts +++ b/types/preview/@ember/engine/-private/registry-proxy-mixin.d.ts @@ -1,5 +1,5 @@ declare module '@ember/engine/-private/registry-proxy-mixin' { - import { RegistryProxy } from '@ember/owner'; + import { RegistryProxy } from '@ember/-internals/owner'; import Mixin from '@ember/object/mixin'; /** diff --git a/types/preview/@ember/engine/tsconfig.json b/types/preview/@ember/engine/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/engine/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/error/tsconfig.json b/types/preview/@ember/error/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/error/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/helper/tsconfig.json b/types/preview/@ember/helper/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/helper/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/modifier/tsconfig.json b/types/preview/@ember/modifier/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/modifier/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/object/tsconfig.json b/types/preview/@ember/object/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/object/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/owner/index.d.ts b/types/preview/@ember/owner/index.d.ts deleted file mode 100644 index 559a31301b2..00000000000 --- a/types/preview/@ember/owner/index.d.ts +++ /dev/null @@ -1,423 +0,0 @@ -declare module '@ember/owner' { - /** - * The name for a factory consists of a namespace and the name of a specific - * type within that namespace, like `'service:session'`. - */ - export type FullName< - Type extends string = string, - Name extends string = string - > = `${Type}:${Name}`; - - /** - * A type registry for the DI system, which other participants in the DI system - * can register themselves into with declaration merging. The contract for this - * type is that its keys are the `Type` from a `FullName`, and each value for a - * `Type` is another registry whose keys are the `Name` from a `FullName`. The - * mechanic for providing a registry is [declaration merging][handbook]. - * - * [handbook]: https://www.typescriptlang.org/docs/handbook/declaration-merging.html - * - * For example, Ember's `Service` class uses this : - * - * ```ts - * export default class Service extends EmberObject {} - * - * // For concrete singleton classes to be merged into. - * interface Registry extends Record {} - * - * declare module '@ember/owner' { - * service: Registry; - * } - * ``` - * - * Declarations of services can then include the registry: - * - * ```ts - * import Service from '@ember/service'; - * - * export default class Session extends Service { - * login(username: string, password: string) { - * // ... - * } - * } - * - * declare module '@ember/service' { - * interface Registry { - * session: Session; - * } - * } - * ``` - * - * Then users of the `Owner` API will be able to reliably do things like this: - * - * ```ts - * getOwner(this)?.lookup('service:session').login("hello", "1234abcd"); - * ``` - */ - export interface DIRegistry extends Record> {} - - // Convenience utilities for pulling a specific factory manager off `DIRegistry` - // if one exists, or falling back to the default definition otherwise. - type ResolveFactoryManager< - Type extends ValidType, - Name extends ValidName - > = DIRegistry[Type][Name] extends object - ? FactoryManager - : FactoryManager | undefined; - - type ResolveFactory< - Type extends ValidType, - Name extends ValidName - > = DIRegistry[Type][Name] extends object - ? Factory - : Factory | object | undefined; - - // This type is shared between `Owner` and `RegistryProxy - interface BasicRegistry { - /** - Registers a factory that can be used for dependency injection (with - `inject`) or for service lookup. Each factory is registered with - a full name including two parts: `type:name`. - - A simple example: - - ```javascript - import Application from '@ember/application'; - import EmberObject from '@ember/object'; - - let App = Application.create(); - - App.Orange = EmberObject.extend(); - App.register('fruit:favorite', App.Orange); - ``` - - Ember will resolve factories from the `App` namespace automatically. - For example `App.CarsController` will be discovered and returned if - an application requests `controller:cars`. - - An example of registering a controller with a non-standard name: - - ```javascript - import Application from '@ember/application'; - import Controller from '@ember/controller'; - - let App = Application.create(); - let Session = Controller.extend(); - - App.register('controller:session', Session); - - // The Session controller can now be treated like a normal controller, - // despite its non-standard name. - App.ApplicationController = Controller.extend({ - needs: ['session'] - }); - ``` - - Registered factories are **instantiated** by having `create` - called on them. Additionally they are **singletons**, each time - they are looked up they return the same instance. - - Some examples modifying that default behavior: - - ```javascript - import Application from '@ember/application'; - import EmberObject from '@ember/object'; - - let App = Application.create(); - - App.Person = EmberObject.extend(); - App.Orange = EmberObject.extend(); - App.Email = EmberObject.extend(); - App.session = EmberObject.create(); - - App.register('model:user', App.Person, { singleton: false }); - App.register('fruit:favorite', App.Orange); - App.register('communication:main', App.Email, { singleton: false }); - App.register('session', App.session, { instantiate: false }); - ``` - - @method register - @param fullName {String} type:name (e.g., 'model:user') - @param factory {any} (e.g., App.Person) - @param options {Object} (optional) disable instantiation or singleton usage - @public - */ - // Dear future maintainer: yes, `Factory | object` is an exceedingly - // weird type here. We actually allow more or less *anything* to be passed - // here. In the future, we may possibly be able to update this to actually - // take advantage of the `FullName` here to require that the registered - // factory and corresponding options do the right thing (passing an *actual* - // factory, not needing `create` if `options.instantiate` is `false`, etc.) - // but doing so will require rationalizing Ember's own internals and may need - // a full Ember RFC. - register( - fullName: FullName, - factory: Factory | object, - options?: RegisterOptions - ): void; - } - - type ValidType = keyof DIRegistry & string; - type ValidName = keyof DIRegistry[Type] & string; - - interface BasicContainer { - /** - * Given a {@linkcode FullName} return a corresponding instance. - */ - lookup>( - fullName: FullName, - options?: RegisterOptions - ): DIRegistry[Type][Name]; - - /** - * Given a fullName of the form `'type:name'`, like `'route:application'`, - * return a corresponding factory manager. - * - * Any instances created via the factory's `.create()` method must be - * destroyed manually by the caller of `.create()`. Typically, this is done - * during the creating objects own `destroy` or `willDestroy` methods. - */ - factoryFor>( - fullName: FullName - ): ResolveFactoryManager; - } - - /** - * Framework objects in an Ember application (components, services, routes, - * etc.) are created via a factory and dependency injection system. Each of - * these objects is the responsibility of an "owner", which handles its - * instantiation and manages its lifetime. - */ - export default interface Owner extends BasicRegistry, BasicContainer {} - - export interface RegisterOptions { - instantiate?: boolean | undefined; - singleton?: boolean | undefined; - } - - /** - * Registered factories are instantiated by having create called on them. - * Additionally they are singletons by default, so each time they are looked up - * they return the same instance. - * - * However, that behavior can be modified with the `instantiate` and `singleton` - * options to the {@linkcode Owner.register} method. - */ - export interface Factory { - // NOTE: this does not check against the types of the target object in any - // way, unfortunately. However, we actually *cannot* constrain it further than - // this without going down a *very* deep rabbit hole (see the historic types - // for `.create()` on DefinitelyTyped if you're curious), because we need (for - // historical reasons) to support classes which implement this contract to be - // able to provide a *narrower* interface than "exactly the public fields on - // the class" while still falling back to the "exactly the public fields on - // the class" for the general case. :sigh: - /** - * A function that will create an instance of the class with any - * dependencies injected. - * - * @param initialValues Any values to set on an instance of the class - */ - create(initialValues?: object): T; - } - - /** - * A manager which can be used for introspection of the factory's class or for - * the creation of factory instances with initial properties. The manager is an - * object with the following properties: - * - * - `class` - The registered or resolved class. - * - `create` - A function that will create an instance of the class with any - * dependencies injected. - * - * @note `FactoryManager` is *not* user-constructible; the only legal way to get - * a `FactoryManager` is via {@linkcode Owner.factoryFor}. - */ - export interface FactoryManager extends Factory { - /** The registered or resolved class. */ - readonly class: Factory; - } - - /** - * A record mapping all known items of a given type: if the item is known it - * will be `true`; otherwise it will be `false` or `undefined`. - */ - export type KnownForTypeResult = { - [FullName in `${Type}:${string}`]: boolean | undefined; - }; - - /** - * A `Resolver` is the mechanism responsible for looking up code in your - * application and converting its naming conventions into the actual classes, - * functions, and templates that Ember needs to resolve its dependencies, for - * example, what template to render for a given route. It is a system that helps - * the app resolve the lookup of JavaScript modules agnostic of what kind of - * module system is used, which can be AMD, CommonJS or just plain globals. It - * is used to lookup routes, models, components, templates, or anything that is - * used in your Ember app. - * - * This interface represents the contract a custom resolver must implement. Most - * apps never need to think about this: the application's resolver is supplied by - * `ember-resolver` in the default blueprint. - */ - export interface Resolver { - resolve: >( - name: FullName - ) => ResolveFactory; - knownForType?: (type: Type) => KnownForTypeResult; - lookupDescription?: (fullName: FullName) => string; - makeToString?: (factory: Factory, fullName: FullName) => string; - normalize?: (fullName: FullName) => FullName; - } - - /** - * Framework objects in an Ember application (components, services, routes, etc.) - * are created via a factory and dependency injection system. Each of these - * objects is the responsibility of an "owner", which handled its - * instantiation and manages its lifetime. - * - * `getOwner` fetches the owner object responsible for an instance. This can - * be used to lookup or resolve other class instances, or register new factories - * into the owner. - * - * For example, this component dynamically looks up a service based on the - * `audioType` passed as an argument: - * - * ```app/components/play-audio.js - * import Component from '@glimmer/component'; - * import { action } from '@ember/object'; - * import { getOwner } from '@ember/application'; - * - * // Usage: - * // - * // - * // - * export default class PlayAudio extends Component { - * get audioService() { - * return getOwner(this)?.lookup(`service:${this.args.audioType}`); - * } - * - * @action - * onPlay() { - * this.audioService?.play(this.args.audioFile); - * } - * } - * ``` - */ - export function getOwner(object: object): Owner | undefined; - - /** - * `setOwner` forces a new owner on a given object instance. This is primarily - * useful in some testing cases. - * - * @param object An object instance. - * @param owner The new owner object of the object instance. - */ - export function setOwner(object: object, owner: Owner): void; - - export interface ContainerProxy extends BasicContainer { - /** - * Returns an object that can be used to provide an owner to a - * manually created instance. - * - * Example: - * - * ``` - * import { getOwner } from '@ember/application'; - * - * let owner = getOwner(this); - * - * User.create( - * owner.ownerInjection(), - * { username: 'rwjblue' } - * ) - * ``` - */ - ownerInjection(): object; - } - - export interface RegistryProxy extends BasicRegistry { - /** - * Given a fullName return the corresponding factory. - */ - resolveRegistration(fullName: FullName): Factory | object | undefined; - - /** - * Unregister a factory. - * - * - * ```javascript - * import Application from '@ember/application'; - * import EmberObject from '@ember/object'; - * let App = Application.create(); - * let User = EmberObject.extend(); - * App.register('model:user', User); - * - * App.resolveRegistration('model:user').create() instanceof User //=> true - * - * App.unregister('model:user') - * App.resolveRegistration('model:user') === undefined //=> true - * ``` - */ - unregister(fullName: FullName): void; - - /** - * Check if a factory is registered. - */ - hasRegistration(fullName: FullName): boolean; - - /** - * Return a specific registered option for a particular factory. - */ - registeredOption( - fullName: FullName, - optionName: K - ): RegisterOptions[K] | undefined; - - /** - * Register options for a particular factory. - */ - registerOptions(fullName: FullName, options: RegisterOptions): void; - - /** - * Return registered options for a particular factory. - */ - registeredOptions(fullName: FullName): RegisterOptions | undefined; - - /** - * Allow registering options for all factories of a type. - * - * ```javascript - * import Application from '@ember/application'; - * - * let App = Application.create(); - * let appInstance = App.buildInstance(); - * - * // if all of type `connection` must not be singletons - * appInstance.registerOptionsForType('connection', { singleton: false }); - * - * appInstance.register('connection:twitter', TwitterConnection); - * appInstance.register('connection:facebook', FacebookConnection); - * - * let twitter = appInstance.lookup('connection:twitter'); - * let twitter2 = appInstance.lookup('connection:twitter'); - * - * twitter === twitter2; // => false - * - * let facebook = appInstance.lookup('connection:facebook'); - * let facebook2 = appInstance.lookup('connection:facebook'); - * - * facebook === facebook2; // => false - * ``` - */ - registerOptionsForType(type: string, options: RegisterOptions): void; - - /** - * Return the registered options for all factories of a type. - */ - registeredOptionsForType(type: string): RegisterOptions | undefined; - } - - // Don't export things unless we *intend* to. - export {}; -} diff --git a/types/preview/@ember/owner/tsconfig.json b/types/preview/@ember/owner/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/owner/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/polyfills/tsconfig.json b/types/preview/@ember/polyfills/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/polyfills/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/routing/tsconfig.json b/types/preview/@ember/routing/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/routing/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/runloop/tsconfig.json b/types/preview/@ember/runloop/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/runloop/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/service/tsconfig.json b/types/preview/@ember/service/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/service/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/string/tsconfig.json b/types/preview/@ember/string/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/string/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/template/tsconfig.json b/types/preview/@ember/template/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/template/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/test/tsconfig.json b/types/preview/@ember/test/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/test/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/@ember/utils/tsconfig.json b/types/preview/@ember/utils/tsconfig.json deleted file mode 100644 index 4082f16a5d9..00000000000 --- a/types/preview/@ember/utils/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/types/preview/ember/tsconfig.json b/types/preview/ember/tsconfig.json deleted file mode 100755 index 3c43903cfdd..00000000000 --- a/types/preview/ember/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../tsconfig.json" -} diff --git a/types/preview/index.d.ts b/types/preview/index.d.ts index 757259080c9..bf1fb1411b1 100644 --- a/types/preview/index.d.ts +++ b/types/preview/index.d.ts @@ -91,8 +91,6 @@ import './@ember/object/observers'; import './@ember/object/promise-proxy-mixin'; import './@ember/object/proxy'; -import './@ember/owner'; - import './@ember/polyfills'; import './@ember/polyfills/types'; diff --git a/types/preview/tsconfig.json b/types/preview/tsconfig.json deleted file mode 100644 index 8fa576671fd..00000000000 --- a/types/preview/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@tsconfig/ember/tsconfig.json", - "compilerOptions": { - "baseUrl": "." - } -} diff --git a/types/publish.mjs b/types/publish.mjs index f4dce2f9d4a..25478f82cc3 100755 --- a/types/publish.mjs +++ b/types/publish.mjs @@ -43,297 +43,298 @@ import MagicString from 'magic-string'; modules. */ const PREVIEW_MODULES = [ - './@ember/-internals/bootstrap/index.d.ts', - './@ember/-internals/browser-environment/index.d.ts', - './@ember/-internals/browser-environment/lib/has-dom.d.ts', - './@ember/-internals/container/index.d.ts', - './@ember/-internals/container/lib/container.d.ts', - './@ember/-internals/container/lib/registry.d.ts', - './@ember/-internals/environment/index.d.ts', - './@ember/-internals/environment/lib/context.d.ts', - './@ember/-internals/environment/lib/env.d.ts', - './@ember/-internals/environment/lib/global.d.ts', - './@ember/-internals/error-handling/index.d.ts', - './@ember/-internals/glimmer/index.d.ts', - './@ember/-internals/glimmer/lib/component-managers/curly.d.ts', - './@ember/-internals/glimmer/lib/component-managers/mount.d.ts', - './@ember/-internals/glimmer/lib/component-managers/outlet.d.ts', - './@ember/-internals/glimmer/lib/component-managers/root.d.ts', - './@ember/-internals/glimmer/lib/component.d.ts', - './@ember/-internals/glimmer/lib/components/abstract-input.d.ts', - './@ember/-internals/glimmer/lib/components/input.d.ts', - './@ember/-internals/glimmer/lib/components/internal.d.ts', - './@ember/-internals/glimmer/lib/components/link-to.d.ts', - './@ember/-internals/glimmer/lib/components/textarea.d.ts', - './@ember/-internals/glimmer/lib/dom.d.ts', - './@ember/-internals/glimmer/lib/environment.d.ts', - './@ember/-internals/glimmer/lib/glimmer-component-docs.d.ts', - './@ember/-internals/glimmer/lib/glimmer-tracking-docs.d.ts', - './@ember/-internals/glimmer/lib/helper.d.ts', - './@ember/-internals/glimmer/lib/helpers/-disallow-dynamic-resolution.d.ts', - './@ember/-internals/glimmer/lib/helpers/-in-element-null-check.d.ts', - './@ember/-internals/glimmer/lib/helpers/-normalize-class.d.ts', - './@ember/-internals/glimmer/lib/helpers/-resolve.d.ts', - './@ember/-internals/glimmer/lib/helpers/-track-array.d.ts', - './@ember/-internals/glimmer/lib/helpers/action.d.ts', - './@ember/-internals/glimmer/lib/helpers/array.d.ts', - './@ember/-internals/glimmer/lib/helpers/component.d.ts', - './@ember/-internals/glimmer/lib/helpers/concat.d.ts', - './@ember/-internals/glimmer/lib/helpers/each-in.d.ts', - './@ember/-internals/glimmer/lib/helpers/fn.d.ts', - './@ember/-internals/glimmer/lib/helpers/get.d.ts', - './@ember/-internals/glimmer/lib/helpers/hash.d.ts', - './@ember/-internals/glimmer/lib/helpers/helper.d.ts', - './@ember/-internals/glimmer/lib/helpers/if-unless.d.ts', - './@ember/-internals/glimmer/lib/helpers/internal-helper.d.ts', - './@ember/-internals/glimmer/lib/helpers/log.d.ts', - './@ember/-internals/glimmer/lib/helpers/modifier.d.ts', - './@ember/-internals/glimmer/lib/helpers/mut.d.ts', - './@ember/-internals/glimmer/lib/helpers/page-title.d.ts', - './@ember/-internals/glimmer/lib/helpers/readonly.d.ts', - './@ember/-internals/glimmer/lib/helpers/unbound.d.ts', - './@ember/-internals/glimmer/lib/helpers/unique-id.d.ts', - './@ember/-internals/glimmer/lib/modifiers/action.d.ts', - './@ember/-internals/glimmer/lib/modifiers/internal.d.ts', - './@ember/-internals/glimmer/lib/modifiers/on.d.ts', - './@ember/-internals/glimmer/lib/renderer.d.ts', - './@ember/-internals/glimmer/lib/resolver.d.ts', - './@ember/-internals/glimmer/lib/setup-registry.d.ts', - './@ember/-internals/glimmer/lib/syntax/in-element.d.ts', - './@ember/-internals/glimmer/lib/syntax/let.d.ts', - './@ember/-internals/glimmer/lib/syntax/mount.d.ts', - './@ember/-internals/glimmer/lib/syntax/outlet.d.ts', - './@ember/-internals/glimmer/lib/syntax/utils.d.ts', - './@ember/-internals/glimmer/lib/template_registry.d.ts', - './@ember/-internals/glimmer/lib/template.d.ts', - './@ember/-internals/glimmer/lib/utils/bindings.d.ts', - './@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.d.ts', - './@ember/-internals/glimmer/lib/utils/debug-render-message.d.ts', - './@ember/-internals/glimmer/lib/utils/iterator.d.ts', - './@ember/-internals/glimmer/lib/utils/managers.d.ts', - './@ember/-internals/glimmer/lib/utils/outlet.d.ts', - './@ember/-internals/glimmer/lib/utils/process-args.d.ts', - './@ember/-internals/glimmer/lib/utils/serialization-first-node-helpers.d.ts', - './@ember/-internals/glimmer/lib/utils/string.d.ts', - './@ember/-internals/glimmer/lib/utils/to-bool.d.ts', - './@ember/-internals/glimmer/lib/views/outlet.d.ts', - './@ember/-internals/meta/index.d.ts', - './@ember/-internals/meta/lib/meta.d.ts', - './@ember/-internals/metal/index.d.ts', - './@ember/-internals/metal/lib/alias.d.ts', - './@ember/-internals/metal/lib/array_events.d.ts', - './@ember/-internals/metal/lib/array.d.ts', - './@ember/-internals/metal/lib/cache.d.ts', - './@ember/-internals/metal/lib/cached.d.ts', - './@ember/-internals/metal/lib/chain-tags.d.ts', - './@ember/-internals/metal/lib/change_event.d.ts', - './@ember/-internals/metal/lib/computed_cache.d.ts', - './@ember/-internals/metal/lib/computed.d.ts', - './@ember/-internals/metal/lib/decorator.d.ts', - './@ember/-internals/metal/lib/dependent_keys.d.ts', - './@ember/-internals/metal/lib/deprecate_property.d.ts', - './@ember/-internals/metal/lib/each_proxy_events.d.ts', - './@ember/-internals/metal/lib/events.d.ts', - './@ember/-internals/metal/lib/expand_properties.d.ts', - './@ember/-internals/metal/lib/get_properties.d.ts', - './@ember/-internals/metal/lib/injected_property.d.ts', - './@ember/-internals/metal/lib/libraries.d.ts', - './@ember/-internals/metal/lib/namespace_search.d.ts', - './@ember/-internals/metal/lib/observer.d.ts', - './@ember/-internals/metal/lib/path_cache.d.ts', - './@ember/-internals/metal/lib/properties.d.ts', - './@ember/-internals/metal/lib/property_events.d.ts', - './@ember/-internals/metal/lib/property_get.d.ts', - './@ember/-internals/metal/lib/property_set.d.ts', - './@ember/-internals/metal/lib/set_properties.d.ts', - './@ember/-internals/metal/lib/tags.d.ts', - './@ember/-internals/metal/lib/tracked.d.ts', - './@ember/-internals/overrides/index.d.ts', - './@ember/-internals/owner/index.d.ts', - './@ember/-internals/routing/index.d.ts', - './@ember/-internals/runtime/index.d.ts', - './@ember/-internals/runtime/lib/ext/rsvp.d.ts', - './@ember/-internals/runtime/lib/mixins/-proxy.d.ts', - './@ember/-internals/runtime/lib/mixins/action_handler.d.ts', - './@ember/-internals/runtime/lib/mixins/comparable.d.ts', - './@ember/-internals/runtime/lib/mixins/container_proxy.d.ts', - './@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts', - './@ember/-internals/runtime/lib/mixins/target_action_support.d.ts', - './@ember/-internals/utils/index.d.ts', - './@ember/-internals/utils/lib/cache.d.ts', - './@ember/-internals/utils/lib/dictionary.d.ts', - './@ember/-internals/utils/lib/ember-array.d.ts', - './@ember/-internals/utils/lib/get-debug-name.d.ts', - './@ember/-internals/utils/lib/guid.d.ts', - './@ember/-internals/utils/lib/inspect.d.ts', - './@ember/-internals/utils/lib/intern.d.ts', - './@ember/-internals/utils/lib/invoke.d.ts', - './@ember/-internals/utils/lib/is_proxy.d.ts', - './@ember/-internals/utils/lib/lookup-descriptor.d.ts', - './@ember/-internals/utils/lib/make-array.d.ts', - './@ember/-internals/utils/lib/mandatory-setter.d.ts', - './@ember/-internals/utils/lib/name.d.ts', - './@ember/-internals/utils/lib/spec.d.ts', - './@ember/-internals/utils/lib/super.d.ts', - './@ember/-internals/utils/lib/symbol.d.ts', - './@ember/-internals/utils/lib/to-string.d.ts', - './@ember/-internals/utils/types.d.ts', - './@ember/-internals/views/index.d.ts', - './@ember/-internals/views/lib/compat/attrs.d.ts', - './@ember/-internals/views/lib/compat/fallback-view-registry.d.ts', - './@ember/-internals/views/lib/component_lookup.d.ts', - './@ember/-internals/views/lib/mixins/action_support.d.ts', - './@ember/-internals/views/lib/mixins/child_views_support.d.ts', - './@ember/-internals/views/lib/mixins/class_names_support.d.ts', - './@ember/-internals/views/lib/mixins/view_state_support.d.ts', - './@ember/-internals/views/lib/mixins/view_support.d.ts', - './@ember/-internals/views/lib/system/action_manager.d.ts', - './@ember/-internals/views/lib/system/event_dispatcher.d.ts', - './@ember/-internals/views/lib/system/utils.d.ts', - './@ember/-internals/views/lib/views/states.d.ts', - './@ember/-internals/views/lib/views/states/default.d.ts', - './@ember/-internals/views/lib/views/states/destroying.d.ts', - './@ember/-internals/views/lib/views/states/has_element.d.ts', - './@ember/-internals/views/lib/views/states/in_dom.d.ts', - './@ember/-internals/views/lib/views/states/pre_render.d.ts', - './@ember/application/index.d.ts', - './@ember/application/instance.d.ts', - './@ember/application/lib/lazy_load.d.ts', - './@ember/application/namespace.d.ts', - './@ember/array/index.d.ts', - './@ember/array/mutable.d.ts', - './@ember/array/proxy.d.ts', - './@ember/canary-features/index.d.ts', - './@ember/component/helper.d.ts', - './@ember/component/index.d.ts', - './@ember/component/template-only.d.ts', - './@ember/debug/container-debug-adapter.d.ts', - './@ember/debug/data-adapter.d.ts', - './@ember/debug/index.d.ts', - './@ember/debug/lib/capture-render-tree.d.ts', - './@ember/debug/lib/deprecate.d.ts', - './@ember/debug/lib/handlers.d.ts', - './@ember/debug/lib/testing.d.ts', - './@ember/debug/lib/warn.d.ts', - './@ember/deprecated-features/index.d.ts', - './@ember/destroyable/index.d.ts', - './@ember/engine/index.d.ts', - './@ember/engine/instance.d.ts', - './@ember/engine/lib/engine-parent.d.ts', - './@ember/enumerable/index.d.ts', - './@ember/enumerable/mutable.d.ts', - './@ember/error/index.d.ts', - './@ember/helper/index.d.ts', - './@ember/instrumentation/index.d.ts', - './@ember/modifier/index.d.ts', - './@ember/object/compat.d.ts', - './@ember/object/computed.d.ts', - './@ember/object/core.d.ts', - './@ember/object/evented.d.ts', - './@ember/object/events.d.ts', - './@ember/object/index.d.ts', - './@ember/object/internals.d.ts', - './@ember/object/lib/computed/computed_macros.d.ts', - './@ember/object/lib/computed/reduce_computed_macros.d.ts', - './@ember/object/mixin.d.ts', - './@ember/object/observable.d.ts', - './@ember/object/observers.d.ts', - './@ember/object/promise-proxy-mixin.d.ts', - './@ember/object/proxy.d.ts', - './@ember/owner/index.d.ts', - './@ember/polyfills/index.d.ts', - './@ember/polyfills/lib/assign.d.ts', - './@ember/renderer/index.d.ts', - './@ember/routing/-internals.d.ts', - './@ember/routing/auto-location.d.ts', - './@ember/routing/hash-location.d.ts', - './@ember/routing/history-location.d.ts', - './@ember/routing/index.d.ts', - './@ember/routing/lib/cache.d.ts', - './@ember/routing/lib/controller_for.d.ts', - './@ember/routing/lib/dsl.d.ts', - './@ember/routing/lib/engines.d.ts', - './@ember/routing/lib/generate_controller.d.ts', - './@ember/routing/lib/location-utils.d.ts', - './@ember/routing/lib/query_params.d.ts', - './@ember/routing/lib/route-info.d.ts', - './@ember/routing/lib/router_state.d.ts', - './@ember/routing/lib/routing-service.d.ts', - './@ember/routing/lib/transition.d.ts', - './@ember/routing/lib/utils.d.ts', - './@ember/routing/location.d.ts', - './@ember/routing/none-location.d.ts', - './@ember/routing/route-info.d.ts', - './@ember/routing/route.d.ts', - './@ember/routing/router-service.d.ts', - './@ember/routing/router.d.ts', - './@ember/routing/transition.d.ts', - './@ember/runloop/index.d.ts', - './@ember/service/index.d.ts', - './@ember/string/index.d.ts', - './@ember/string/lib/string_registry.d.ts', - './@ember/template-compilation/index.d.ts', - './@ember/template-factory/index.d.ts', - './@ember/template/index.d.ts', - './@ember/test/adapter.d.ts', - './@ember/test/index.d.ts', - './@ember/utils/index.d.ts', - './@ember/utils/lib/compare.d.ts', - './@ember/utils/lib/is_blank.d.ts', - './@ember/utils/lib/is_empty.d.ts', - './@ember/utils/lib/is_none.d.ts', - './@ember/utils/lib/is_present.d.ts', - './@ember/utils/lib/is-equal.d.ts', - './@ember/utils/lib/type-of.d.ts', - './@ember/version/index.d.ts', - './@glimmer/tracking/index.d.ts', - './@glimmer/tracking/primitives/cache.d.ts', - './ember-template-compiler/index.d.ts', - './ember-template-compiler/lib/plugins/assert-against-attrs.d.ts', - './ember-template-compiler/lib/plugins/assert-against-named-outlets.d.ts', - './ember-template-compiler/lib/plugins/assert-input-helper-without-block.d.ts', - './ember-template-compiler/lib/plugins/assert-reserved-named-arguments.d.ts', - './ember-template-compiler/lib/plugins/assert-splattribute-expression.d.ts', - './ember-template-compiler/lib/plugins/index.d.ts', - './ember-template-compiler/lib/plugins/transform-action-syntax.d.ts', - './ember-template-compiler/lib/plugins/transform-each-in-into-each.d.ts', - './ember-template-compiler/lib/plugins/transform-each-track-array.d.ts', - './ember-template-compiler/lib/plugins/transform-in-element.d.ts', - './ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.d.ts', - './ember-template-compiler/lib/plugins/transform-resolutions.d.ts', - './ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet.d.ts', - './ember-template-compiler/lib/plugins/utils.d.ts', - './ember-template-compiler/lib/system/bootstrap.d.ts', - './ember-template-compiler/lib/system/calculate-location-display.d.ts', - './ember-template-compiler/lib/system/compile-options.d.ts', - './ember-template-compiler/lib/system/compile.d.ts', - './ember-template-compiler/lib/system/dasherize-component-name.d.ts', - './ember-template-compiler/lib/system/initializer.d.ts', - './ember-template-compiler/lib/system/precompile.d.ts', - './ember-testing/index.d.ts', - './ember-testing/lib/adapters/adapter.d.ts', - './ember-testing/lib/adapters/qunit.d.ts', - './ember-testing/lib/ext/application.d.ts', - './ember-testing/lib/ext/rsvp.d.ts', - './ember-testing/lib/helpers.d.ts', - './ember-testing/lib/helpers/and_then.d.ts', - './ember-testing/lib/helpers/current_path.d.ts', - './ember-testing/lib/helpers/current_route_name.d.ts', - './ember-testing/lib/helpers/current_url.d.ts', - './ember-testing/lib/helpers/pause_test.d.ts', - './ember-testing/lib/helpers/visit.d.ts', - './ember-testing/lib/helpers/wait.d.ts', - './ember-testing/lib/initializers.d.ts', - './ember-testing/lib/setup_for_testing.d.ts', - './ember-testing/lib/test.d.ts', - './ember-testing/lib/test/adapter.d.ts', - './ember-testing/lib/test/helpers.d.ts', - './ember-testing/lib/test/on_inject_helpers.d.ts', - './ember-testing/lib/test/pending_requests.d.ts', - './ember-testing/lib/test/promise.d.ts', - './ember-testing/lib/test/run.d.ts', - './ember-testing/lib/test/waiters.d.ts', - './ember/index.d.ts', + '@ember/-internals/bootstrap/index.d.ts', + '@ember/-internals/browser-environment/index.d.ts', + '@ember/-internals/browser-environment/lib/has-dom.d.ts', + '@ember/-internals/container/index.d.ts', + '@ember/-internals/container/lib/container.d.ts', + '@ember/-internals/container/lib/registry.d.ts', + '@ember/-internals/environment/index.d.ts', + '@ember/-internals/environment/lib/context.d.ts', + '@ember/-internals/environment/lib/env.d.ts', + '@ember/-internals/environment/lib/global.d.ts', + '@ember/-internals/error-handling/index.d.ts', + '@ember/-internals/glimmer/index.d.ts', + '@ember/-internals/glimmer/lib/component-managers/curly.d.ts', + '@ember/-internals/glimmer/lib/component-managers/mount.d.ts', + '@ember/-internals/glimmer/lib/component-managers/outlet.d.ts', + '@ember/-internals/glimmer/lib/component-managers/root.d.ts', + '@ember/-internals/glimmer/lib/component.d.ts', + '@ember/-internals/glimmer/lib/components/abstract-input.d.ts', + '@ember/-internals/glimmer/lib/components/input.d.ts', + '@ember/-internals/glimmer/lib/components/internal.d.ts', + '@ember/-internals/glimmer/lib/components/link-to.d.ts', + '@ember/-internals/glimmer/lib/components/textarea.d.ts', + '@ember/-internals/glimmer/lib/dom.d.ts', + '@ember/-internals/glimmer/lib/environment.d.ts', + '@ember/-internals/glimmer/lib/glimmer-component-docs.d.ts', + '@ember/-internals/glimmer/lib/glimmer-tracking-docs.d.ts', + '@ember/-internals/glimmer/lib/helper.d.ts', + '@ember/-internals/glimmer/lib/helpers/-disallow-dynamic-resolution.d.ts', + '@ember/-internals/glimmer/lib/helpers/-in-element-null-check.d.ts', + '@ember/-internals/glimmer/lib/helpers/-normalize-class.d.ts', + '@ember/-internals/glimmer/lib/helpers/-resolve.d.ts', + '@ember/-internals/glimmer/lib/helpers/-track-array.d.ts', + '@ember/-internals/glimmer/lib/helpers/action.d.ts', + '@ember/-internals/glimmer/lib/helpers/array.d.ts', + '@ember/-internals/glimmer/lib/helpers/component.d.ts', + '@ember/-internals/glimmer/lib/helpers/concat.d.ts', + '@ember/-internals/glimmer/lib/helpers/each-in.d.ts', + '@ember/-internals/glimmer/lib/helpers/fn.d.ts', + '@ember/-internals/glimmer/lib/helpers/get.d.ts', + '@ember/-internals/glimmer/lib/helpers/hash.d.ts', + '@ember/-internals/glimmer/lib/helpers/helper.d.ts', + '@ember/-internals/glimmer/lib/helpers/if-unless.d.ts', + '@ember/-internals/glimmer/lib/helpers/internal-helper.d.ts', + '@ember/-internals/glimmer/lib/helpers/log.d.ts', + '@ember/-internals/glimmer/lib/helpers/modifier.d.ts', + '@ember/-internals/glimmer/lib/helpers/mut.d.ts', + '@ember/-internals/glimmer/lib/helpers/page-title.d.ts', + '@ember/-internals/glimmer/lib/helpers/readonly.d.ts', + '@ember/-internals/glimmer/lib/helpers/unbound.d.ts', + '@ember/-internals/glimmer/lib/helpers/unique-id.d.ts', + '@ember/-internals/glimmer/lib/modifiers/action.d.ts', + '@ember/-internals/glimmer/lib/modifiers/internal.d.ts', + '@ember/-internals/glimmer/lib/modifiers/on.d.ts', + '@ember/-internals/glimmer/lib/renderer.d.ts', + '@ember/-internals/glimmer/lib/resolver.d.ts', + '@ember/-internals/glimmer/lib/setup-registry.d.ts', + '@ember/-internals/glimmer/lib/syntax/in-element.d.ts', + '@ember/-internals/glimmer/lib/syntax/let.d.ts', + '@ember/-internals/glimmer/lib/syntax/mount.d.ts', + '@ember/-internals/glimmer/lib/syntax/outlet.d.ts', + '@ember/-internals/glimmer/lib/syntax/utils.d.ts', + '@ember/-internals/glimmer/lib/template_registry.d.ts', + '@ember/-internals/glimmer/lib/template.d.ts', + '@ember/-internals/glimmer/lib/utils/bindings.d.ts', + '@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.d.ts', + '@ember/-internals/glimmer/lib/utils/debug-render-message.d.ts', + '@ember/-internals/glimmer/lib/utils/iterator.d.ts', + '@ember/-internals/glimmer/lib/utils/managers.d.ts', + '@ember/-internals/glimmer/lib/utils/outlet.d.ts', + '@ember/-internals/glimmer/lib/utils/process-args.d.ts', + '@ember/-internals/glimmer/lib/utils/serialization-first-node-helpers.d.ts', + '@ember/-internals/glimmer/lib/utils/string.d.ts', + '@ember/-internals/glimmer/lib/utils/to-bool.d.ts', + '@ember/-internals/glimmer/lib/views/outlet.d.ts', + '@ember/-internals/meta/index.d.ts', + '@ember/-internals/meta/lib/meta.d.ts', + '@ember/-internals/metal/index.d.ts', + '@ember/-internals/metal/lib/alias.d.ts', + '@ember/-internals/metal/lib/array_events.d.ts', + '@ember/-internals/metal/lib/array.d.ts', + '@ember/-internals/metal/lib/cache.d.ts', + '@ember/-internals/metal/lib/cached.d.ts', + '@ember/-internals/metal/lib/chain-tags.d.ts', + '@ember/-internals/metal/lib/change_event.d.ts', + '@ember/-internals/metal/lib/computed_cache.d.ts', + '@ember/-internals/metal/lib/computed.d.ts', + '@ember/-internals/metal/lib/decorator.d.ts', + '@ember/-internals/metal/lib/dependent_keys.d.ts', + '@ember/-internals/metal/lib/deprecate_property.d.ts', + '@ember/-internals/metal/lib/each_proxy_events.d.ts', + '@ember/-internals/metal/lib/events.d.ts', + '@ember/-internals/metal/lib/expand_properties.d.ts', + '@ember/-internals/metal/lib/get_properties.d.ts', + '@ember/-internals/metal/lib/injected_property.d.ts', + '@ember/-internals/metal/lib/libraries.d.ts', + '@ember/-internals/metal/lib/namespace_search.d.ts', + '@ember/-internals/metal/lib/observer.d.ts', + '@ember/-internals/metal/lib/path_cache.d.ts', + '@ember/-internals/metal/lib/properties.d.ts', + '@ember/-internals/metal/lib/property_events.d.ts', + '@ember/-internals/metal/lib/property_get.d.ts', + '@ember/-internals/metal/lib/property_set.d.ts', + '@ember/-internals/metal/lib/set_properties.d.ts', + '@ember/-internals/metal/lib/tags.d.ts', + '@ember/-internals/metal/lib/tracked.d.ts', + '@ember/-internals/overrides/index.d.ts', + '@ember/-internals/routing/index.d.ts', + '@ember/-internals/runtime/index.d.ts', + '@ember/-internals/runtime/lib/ext/rsvp.d.ts', + '@ember/-internals/runtime/lib/mixins/-proxy.d.ts', + '@ember/-internals/runtime/lib/mixins/action_handler.d.ts', + '@ember/-internals/runtime/lib/mixins/comparable.d.ts', + '@ember/-internals/runtime/lib/mixins/container_proxy.d.ts', + '@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts', + '@ember/-internals/runtime/lib/mixins/target_action_support.d.ts', + '@ember/-internals/utils/index.d.ts', + '@ember/-internals/utils/lib/cache.d.ts', + '@ember/-internals/utils/lib/dictionary.d.ts', + '@ember/-internals/utils/lib/ember-array.d.ts', + '@ember/-internals/utils/lib/get-debug-name.d.ts', + '@ember/-internals/utils/lib/guid.d.ts', + '@ember/-internals/utils/lib/inspect.d.ts', + '@ember/-internals/utils/lib/intern.d.ts', + '@ember/-internals/utils/lib/invoke.d.ts', + '@ember/-internals/utils/lib/is_proxy.d.ts', + '@ember/-internals/utils/lib/lookup-descriptor.d.ts', + '@ember/-internals/utils/lib/make-array.d.ts', + '@ember/-internals/utils/lib/mandatory-setter.d.ts', + '@ember/-internals/utils/lib/name.d.ts', + '@ember/-internals/utils/lib/spec.d.ts', + '@ember/-internals/utils/lib/super.d.ts', + '@ember/-internals/utils/lib/symbol.d.ts', + '@ember/-internals/utils/lib/to-string.d.ts', + '@ember/-internals/utils/types.d.ts', + '@ember/-internals/views/index.d.ts', + '@ember/-internals/views/lib/compat/attrs.d.ts', + '@ember/-internals/views/lib/compat/fallback-view-registry.d.ts', + '@ember/-internals/views/lib/component_lookup.d.ts', + '@ember/-internals/views/lib/mixins/action_support.d.ts', + '@ember/-internals/views/lib/mixins/child_views_support.d.ts', + '@ember/-internals/views/lib/mixins/class_names_support.d.ts', + '@ember/-internals/views/lib/mixins/view_state_support.d.ts', + '@ember/-internals/views/lib/mixins/view_support.d.ts', + '@ember/-internals/views/lib/system/action_manager.d.ts', + '@ember/-internals/views/lib/system/event_dispatcher.d.ts', + '@ember/-internals/views/lib/system/utils.d.ts', + '@ember/-internals/views/lib/views/core_view.d.ts', + '@ember/-internals/views/lib/views/states.d.ts', + '@ember/-internals/views/lib/views/states/default.d.ts', + '@ember/-internals/views/lib/views/states/destroying.d.ts', + '@ember/-internals/views/lib/views/states/has_element.d.ts', + '@ember/-internals/views/lib/views/states/in_dom.d.ts', + '@ember/-internals/views/lib/views/states/pre_render.d.ts', + '@ember/application/index.d.ts', + '@ember/application/instance.d.ts', + '@ember/application/lib/lazy_load.d.ts', + '@ember/application/namespace.d.ts', + '@ember/array/index.d.ts', + '@ember/array/mutable.d.ts', + '@ember/array/proxy.d.ts', + '@ember/canary-features/index.d.ts', + '@ember/component/helper.d.ts', + '@ember/component/index.d.ts', + '@ember/component/template-only.d.ts', + '@ember/controller/index.d.ts', + '@ember/debug/container-debug-adapter.d.ts', + '@ember/debug/data-adapter.d.ts', + '@ember/debug/index.d.ts', + '@ember/debug/lib/capture-render-tree.d.ts', + '@ember/debug/lib/deprecate.d.ts', + '@ember/debug/lib/handlers.d.ts', + '@ember/debug/lib/testing.d.ts', + '@ember/debug/lib/warn.d.ts', + '@ember/deprecated-features/index.d.ts', + '@ember/destroyable/index.d.ts', + '@ember/engine/index.d.ts', + '@ember/engine/instance.d.ts', + '@ember/engine/lib/engine-parent.d.ts', + '@ember/enumerable/index.d.ts', + '@ember/enumerable/mutable.d.ts', + '@ember/error/index.d.ts', + '@ember/helper/index.d.ts', + '@ember/instrumentation/index.d.ts', + '@ember/modifier/index.d.ts', + '@ember/object/-internals.d.ts', + '@ember/object/compat.d.ts', + '@ember/object/computed.d.ts', + '@ember/object/core.d.ts', + '@ember/object/evented.d.ts', + '@ember/object/events.d.ts', + '@ember/object/index.d.ts', + '@ember/object/internals.d.ts', + '@ember/object/lib/computed/computed_macros.d.ts', + '@ember/object/lib/computed/reduce_computed_macros.d.ts', + '@ember/object/mixin.d.ts', + '@ember/object/observable.d.ts', + '@ember/object/observers.d.ts', + '@ember/object/promise-proxy-mixin.d.ts', + '@ember/object/proxy.d.ts', + '@ember/polyfills/index.d.ts', + '@ember/polyfills/lib/assign.d.ts', + '@ember/renderer/index.d.ts', + '@ember/routing/-internals.d.ts', + '@ember/routing/auto-location.d.ts', + '@ember/routing/hash-location.d.ts', + '@ember/routing/history-location.d.ts', + '@ember/routing/index.d.ts', + '@ember/routing/lib/cache.d.ts', + '@ember/routing/lib/controller_for.d.ts', + '@ember/routing/lib/dsl.d.ts', + '@ember/routing/lib/engines.d.ts', + '@ember/routing/lib/generate_controller.d.ts', + '@ember/routing/lib/location-utils.d.ts', + '@ember/routing/lib/query_params.d.ts', + '@ember/routing/lib/route-info.d.ts', + '@ember/routing/lib/router_state.d.ts', + '@ember/routing/lib/routing-service.d.ts', + '@ember/routing/lib/transition.d.ts', + '@ember/routing/lib/utils.d.ts', + '@ember/routing/location.d.ts', + '@ember/routing/none-location.d.ts', + '@ember/routing/route-info.d.ts', + '@ember/routing/route.d.ts', + '@ember/routing/router-service.d.ts', + '@ember/routing/router.d.ts', + '@ember/routing/transition.d.ts', + '@ember/runloop/index.d.ts', + '@ember/service/index.d.ts', + '@ember/string/index.d.ts', + '@ember/string/lib/string_registry.d.ts', + '@ember/template-compilation/index.d.ts', + '@ember/template-factory/index.d.ts', + '@ember/template/index.d.ts', + '@ember/test/adapter.d.ts', + '@ember/test/index.d.ts', + '@ember/utils/index.d.ts', + '@ember/utils/lib/compare.d.ts', + '@ember/utils/lib/is_blank.d.ts', + '@ember/utils/lib/is_empty.d.ts', + '@ember/utils/lib/is_none.d.ts', + '@ember/utils/lib/is_present.d.ts', + '@ember/utils/lib/is-equal.d.ts', + '@ember/utils/lib/type-of.d.ts', + '@ember/version/index.d.ts', + '@glimmer/tracking/index.d.ts', + '@glimmer/tracking/primitives/cache.d.ts', + 'ember-template-compiler/index.d.ts', + 'ember-template-compiler/lib/plugins/assert-against-attrs.d.ts', + 'ember-template-compiler/lib/plugins/assert-against-named-outlets.d.ts', + 'ember-template-compiler/lib/plugins/assert-input-helper-without-block.d.ts', + 'ember-template-compiler/lib/plugins/assert-reserved-named-arguments.d.ts', + 'ember-template-compiler/lib/plugins/assert-splattribute-expression.d.ts', + 'ember-template-compiler/lib/plugins/index.d.ts', + 'ember-template-compiler/lib/plugins/transform-action-syntax.d.ts', + 'ember-template-compiler/lib/plugins/transform-each-in-into-each.d.ts', + 'ember-template-compiler/lib/plugins/transform-each-track-array.d.ts', + 'ember-template-compiler/lib/plugins/transform-in-element.d.ts', + 'ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.d.ts', + 'ember-template-compiler/lib/plugins/transform-resolutions.d.ts', + 'ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet.d.ts', + 'ember-template-compiler/lib/plugins/utils.d.ts', + 'ember-template-compiler/lib/system/bootstrap.d.ts', + 'ember-template-compiler/lib/system/calculate-location-display.d.ts', + 'ember-template-compiler/lib/system/compile-options.d.ts', + 'ember-template-compiler/lib/system/compile.d.ts', + 'ember-template-compiler/lib/system/dasherize-component-name.d.ts', + 'ember-template-compiler/lib/system/initializer.d.ts', + 'ember-template-compiler/lib/system/precompile.d.ts', + 'ember-testing/index.d.ts', + 'ember-testing/lib/adapters/adapter.d.ts', + 'ember-testing/lib/adapters/qunit.d.ts', + 'ember-testing/lib/ext/application.d.ts', + 'ember-testing/lib/ext/rsvp.d.ts', + 'ember-testing/lib/helpers.d.ts', + 'ember-testing/lib/helpers/and_then.d.ts', + 'ember-testing/lib/helpers/current_path.d.ts', + 'ember-testing/lib/helpers/current_route_name.d.ts', + 'ember-testing/lib/helpers/current_url.d.ts', + 'ember-testing/lib/helpers/pause_test.d.ts', + 'ember-testing/lib/helpers/visit.d.ts', + 'ember-testing/lib/helpers/wait.d.ts', + 'ember-testing/lib/initializers.d.ts', + 'ember-testing/lib/setup_for_testing.d.ts', + 'ember-testing/lib/test.d.ts', + 'ember-testing/lib/test/adapter.d.ts', + 'ember-testing/lib/test/helpers.d.ts', + 'ember-testing/lib/test/on_inject_helpers.d.ts', + 'ember-testing/lib/test/pending_requests.d.ts', + 'ember-testing/lib/test/promise.d.ts', + 'ember-testing/lib/test/run.d.ts', + 'ember-testing/lib/test/waiters.d.ts', + 'ember/index.d.ts', ]; const MODULES_PLACEHOLDER = '~~~MODULES GO HERE~~~'; @@ -410,8 +411,19 @@ async function main() { } let sideEffectModules = moduleNames - .filter((module) => !PREVIEW_MODULES.includes(module)) - .map((moduleName) => `import './${moduleName}';`) + .filter((moduleName) => !PREVIEW_MODULES.includes(moduleName)) + .map((moduleName) => { + // We need to import "package root" types as such, *not* via the actual + // module which provides them, or TS does not see them correctly via the + // side effect imports, so transform them accordingly: + // `@ember/owner/index.d.ts` -> `@ember/owner` + let moduleOrPackagePath = moduleName.replace(/\/index.d.ts$/, ''); + + // Then create a relative path *to* the path on disk so that the + // side-effect import is e.g. `import './@ember/owner';`, which makes it + // resolve the actual local file, *not* go looking for some other package. + return `import './${moduleOrPackagePath}';`; + }) .join('\n'); let stableIndexDTsContents = BASE_INDEX_D_TS.replace(MODULES_PLACEHOLDER, sideEffectModules); @@ -438,8 +450,16 @@ function wrapInDeclareModule(moduleName) { let moduleNameForDeclaration = moduleName.replace('/index.d.ts', ''); + // This is a horrible nightmare of a hack; in a later PR I'm going to just + // replace all of this by going ahead and using recast or such. As annoying as + // that will be, it will be *way* more reliable. let string = new MagicString(contents); - string.indent(' ').prepend(`declare module '${moduleNameForDeclaration}' {\n`).append('}\n'); + string + .replace(/^export declare /gm, 'export ') // g for global, m for multiline + .replace(/^declare /gm, '') // g for global, m for multiline + .indent(' ') + .prepend(`declare module '${moduleNameForDeclaration}' {\n`) + .append('}\n'); try { fs.writeFileSync(modulePath, string.toString());