ember-source 4.8.0-beta.1 → 4.8.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build-metadata.json +3 -3
  3. package/dist/ember-template-compiler.js +2 -2
  4. package/dist/ember-template-compiler.map +1 -1
  5. package/dist/ember-testing.js +1 -1
  6. package/dist/ember-testing.map +1 -1
  7. package/dist/ember.debug.js +2 -516
  8. package/dist/ember.debug.map +1 -1
  9. package/dist/header/license.js +1 -1
  10. package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +0 -7
  11. package/dist/packages/ember/version.js +1 -1
  12. package/docs/data.json +63 -63
  13. package/package.json +22 -4
  14. package/types/preview/@ember/-internals/resolver.d.ts +35 -0
  15. package/types/preview/@ember/application/-private/event-dispatcher.d.ts +18 -0
  16. package/types/preview/@ember/application/-private/registry.d.ts +15 -0
  17. package/types/preview/@ember/application/deprecations.d.ts +24 -0
  18. package/types/preview/@ember/application/index.d.ts +153 -0
  19. package/types/preview/@ember/application/instance.d.ts +9 -0
  20. package/types/preview/@ember/application/tsconfig.json +3 -0
  21. package/types/preview/@ember/application/types.d.ts +29 -0
  22. package/types/preview/@ember/array/-private/enumerable.d.ts +13 -0
  23. package/types/preview/@ember/array/-private/mutable-enumerable.d.ts +13 -0
  24. package/types/preview/@ember/array/-private/native-array.d.ts +23 -0
  25. package/types/preview/@ember/array/index.d.ts +243 -0
  26. package/types/preview/@ember/array/mutable.d.ts +94 -0
  27. package/types/preview/@ember/array/proxy.d.ts +29 -0
  28. package/types/preview/@ember/array/tsconfig.json +3 -0
  29. package/types/preview/@ember/component/-private/class-names-support.d.ts +27 -0
  30. package/types/preview/@ember/component/-private/core-view.d.ts +14 -0
  31. package/types/preview/@ember/component/-private/glimmer-interfaces.d.ts +45 -0
  32. package/types/preview/@ember/component/-private/signature-utils.d.ts +107 -0
  33. package/types/preview/@ember/component/-private/view-mixin.d.ts +59 -0
  34. package/types/preview/@ember/component/helper.d.ts +122 -0
  35. package/types/preview/@ember/component/index.d.ts +132 -0
  36. package/types/preview/@ember/component/template-only.d.ts +47 -0
  37. package/types/preview/@ember/component/tsconfig.json +3 -0
  38. package/types/preview/@ember/controller/index.d.ts +48 -0
  39. package/types/preview/@ember/controller/tsconfig.json +3 -0
  40. package/types/preview/@ember/debug/container-debug-adapter.d.ts +13 -0
  41. package/types/preview/@ember/debug/data-adapter.d.ts +64 -0
  42. package/types/preview/@ember/debug/index.d.ts +98 -0
  43. package/types/preview/@ember/debug/tsconfig.json +3 -0
  44. package/types/preview/@ember/destroyable/index.d.ts +23 -0
  45. package/types/preview/@ember/destroyable/tsconfig.json +3 -0
  46. package/types/preview/@ember/engine/-private/container-proxy-mixin.d.ts +17 -0
  47. package/types/preview/@ember/engine/-private/registry-proxy-mixin.d.ts +54 -0
  48. package/types/preview/@ember/engine/-private/types/initializer.d.ts +8 -0
  49. package/types/preview/@ember/engine/index.d.ts +45 -0
  50. package/types/preview/@ember/engine/instance.d.ts +24 -0
  51. package/types/preview/@ember/engine/tsconfig.json +3 -0
  52. package/types/preview/@ember/error/index.d.ts +6 -0
  53. package/types/preview/@ember/error/tsconfig.json +3 -0
  54. package/types/preview/@ember/helper/index.d.ts +49 -0
  55. package/types/preview/@ember/helper/tsconfig.json +3 -0
  56. package/types/preview/@ember/modifier/index.d.ts +33 -0
  57. package/types/preview/@ember/modifier/tsconfig.json +3 -0
  58. package/types/preview/@ember/object/-private/action-handler.d.ts +31 -0
  59. package/types/preview/@ember/object/-private/types.d.ts +63 -0
  60. package/types/preview/@ember/object/compat.d.ts +9 -0
  61. package/types/preview/@ember/object/computed.d.ts +263 -0
  62. package/types/preview/@ember/object/core.d.ts +89 -0
  63. package/types/preview/@ember/object/evented.d.ts +45 -0
  64. package/types/preview/@ember/object/events.d.ts +47 -0
  65. package/types/preview/@ember/object/index.d.ts +126 -0
  66. package/types/preview/@ember/object/internals.d.ts +17 -0
  67. package/types/preview/@ember/object/mixin.d.ts +19 -0
  68. package/types/preview/@ember/object/observable.d.ts +89 -0
  69. package/types/preview/@ember/object/observers.d.ts +34 -0
  70. package/types/preview/@ember/object/promise-proxy-mixin.d.ts +37 -0
  71. package/types/preview/@ember/object/proxy.d.ts +27 -0
  72. package/types/preview/@ember/object/tsconfig.json +3 -0
  73. package/types/preview/@ember/owner/index.d.ts +102 -0
  74. package/types/preview/@ember/owner/tsconfig.json +3 -0
  75. package/types/preview/@ember/polyfills/index.d.ts +23 -0
  76. package/types/preview/@ember/polyfills/tsconfig.json +3 -0
  77. package/types/preview/@ember/polyfills/types.d.ts +6 -0
  78. package/types/preview/@ember/routing/-private/router-dsl.d.ts +20 -0
  79. package/types/preview/@ember/routing/auto-location.d.ts +8 -0
  80. package/types/preview/@ember/routing/hash-location.d.ts +10 -0
  81. package/types/preview/@ember/routing/history-location.d.ts +9 -0
  82. package/types/preview/@ember/routing/index.d.ts +20 -0
  83. package/types/preview/@ember/routing/none-location.d.ts +11 -0
  84. package/types/preview/@ember/routing/route-info.d.ts +74 -0
  85. package/types/preview/@ember/routing/route.d.ts +533 -0
  86. package/types/preview/@ember/routing/router-service.d.ts +351 -0
  87. package/types/preview/@ember/routing/router.d.ts +49 -0
  88. package/types/preview/@ember/routing/transition.d.ts +126 -0
  89. package/types/preview/@ember/routing/tsconfig.json +3 -0
  90. package/types/preview/@ember/routing/types.d.ts +15 -0
  91. package/types/preview/@ember/runloop/-private/backburner.d.ts +43 -0
  92. package/types/preview/@ember/runloop/-private/types.d.ts +9 -0
  93. package/types/preview/@ember/runloop/index.d.ts +175 -0
  94. package/types/preview/@ember/runloop/tsconfig.json +3 -0
  95. package/types/preview/@ember/runloop/types.d.ts +5 -0
  96. package/types/preview/@ember/service/index.d.ts +25 -0
  97. package/types/preview/@ember/service/tsconfig.json +3 -0
  98. package/types/preview/@ember/string/index.d.ts +9 -0
  99. package/types/preview/@ember/string/tsconfig.json +3 -0
  100. package/types/preview/@ember/template/-private/handlebars.d.ts +7 -0
  101. package/types/preview/@ember/template/index.d.ts +5 -0
  102. package/types/preview/@ember/template/tsconfig.json +3 -0
  103. package/types/preview/@ember/test/adapter.d.ts +22 -0
  104. package/types/preview/@ember/test/index.d.ts +49 -0
  105. package/types/preview/@ember/test/tsconfig.json +3 -0
  106. package/types/preview/@ember/utils/-private/types.d.ts +39 -0
  107. package/types/preview/@ember/utils/index.d.ts +42 -0
  108. package/types/preview/@ember/utils/tsconfig.json +3 -0
  109. package/types/preview/ember/-private/type-utils.d.ts +54 -0
  110. package/types/preview/ember/index.d.ts +381 -0
  111. package/types/preview/ember/tsconfig.json +3 -0
  112. package/types/preview/index.d.ts +120 -0
  113. package/types/preview/tsconfig.json +6 -0
  114. package/types/stable/index.d.ts +12 -0
  115. package/dist/packages/@ember/runloop/type-tests.ts/begin-end.test.js +0 -5
  116. package/dist/packages/@ember/runloop/type-tests.ts/bind.test.js +0 -59
  117. package/dist/packages/@ember/runloop/type-tests.ts/cancel.test.js +0 -5
  118. package/dist/packages/@ember/runloop/type-tests.ts/debounce.test.js +0 -77
  119. package/dist/packages/@ember/runloop/type-tests.ts/join.test.js +0 -38
  120. package/dist/packages/@ember/runloop/type-tests.ts/later.test.js +0 -38
  121. package/dist/packages/@ember/runloop/type-tests.ts/next.test.js +0 -38
  122. package/dist/packages/@ember/runloop/type-tests.ts/once.test.js +0 -38
  123. package/dist/packages/@ember/runloop/type-tests.ts/run.test.js +0 -38
  124. package/dist/packages/@ember/runloop/type-tests.ts/schedule-once.test.js +0 -39
  125. package/dist/packages/@ember/runloop/type-tests.ts/schedule.test.js +0 -39
  126. package/dist/packages/@ember/runloop/type-tests.ts/throttle.test.js +0 -77
@@ -0,0 +1,47 @@
1
+ declare module '@ember/component/template-only' {
2
+ import { Opaque } from 'ember/-private/type-utils';
3
+
4
+ /**
5
+ * Template-only components have no backing class instance, so this in their
6
+ * templates is null. This means that you can only reference passed in arguments
7
+ * via named argument syntax (e.g. `{{@arg}}`):
8
+ *
9
+ * ```hbs
10
+ * {{!--
11
+ * This does not work, since `this` does not exist
12
+ * --}}
13
+ * <label for="title">Title</label>
14
+ * <Input @value={{this.value}} id="title" />
15
+ * ```
16
+ *
17
+ * Additionally, the mut helper generally can't be used for the same reason:
18
+ *
19
+ * ```hbs
20
+ * {{!-- This does not work --}}
21
+ * <input
22
+ * value={{this.value}}
23
+ * onkeyup={{action (mut this.value) target="value"}}
24
+ * />
25
+ * ```
26
+ *
27
+ * Since Octane, a template-only component shares a subset of features that are
28
+ * available in `@glimmer/component`. Such component can be seamlessly
29
+ * "upgraded" to a Glimmer component, when you add a JavaScript file alongside
30
+ * the template.
31
+ */
32
+ export interface TemplateOnlyComponent<S = unknown> extends Opaque<S> {
33
+ toString(): string;
34
+ }
35
+
36
+ /**
37
+ * A convenience alias for {@link TemplateOnlyComponent}
38
+ */
39
+ export type TOC<S> = TemplateOnlyComponent<S>;
40
+
41
+ // The generic here is for a *signature: a way to hang information for tools
42
+ // like Glint which can provide typey checking for component templates using
43
+ // information supplied via this generic. While it may appear useless on this
44
+ // class definition and extension, it is used by external tools and should not
45
+ // be removed.
46
+ export default function templateOnly<S>(moduleName?: string): TemplateOnlyComponent<S>;
47
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,48 @@
1
+ declare module '@ember/controller' {
2
+ import ActionHandler from '@ember/object/-private/action-handler';
3
+ import Mixin from '@ember/object/mixin';
4
+ import EmberObject from '@ember/object';
5
+ import type { BasicComputedProperty } from '@ember/object/computed';
6
+
7
+ type QueryParamTypes = 'boolean' | 'number' | 'array' | 'string';
8
+ type QueryParamScopeTypes = 'controller' | 'model';
9
+
10
+ interface QueryParamConfig {
11
+ type?: QueryParamTypes | undefined;
12
+ scope?: QueryParamScopeTypes | undefined;
13
+ as?: string | undefined;
14
+ }
15
+
16
+ /**
17
+ * Additional methods for the Controller.
18
+ */
19
+ export interface ControllerMixin extends ActionHandler {
20
+ /**
21
+ * @deprecated until 5.0. Use `RouterService.replaceWith` instead.
22
+ */
23
+ replaceRoute(name: string, ...args: any[]): void;
24
+ /**
25
+ * @deprecated until 5.0. Use `RouterService.transitionTo` instead.
26
+ */
27
+ transitionToRoute(name: string, ...args: any[]): void;
28
+ /**
29
+ * @deprecated until 5.0. Use `RouterService.transitionTo` instead.
30
+ */
31
+ transitionToRoute(...args: any[]): void;
32
+ model: unknown;
33
+ queryParams: Array<string | Record<string, QueryParamConfig | string | undefined>>;
34
+ target: object;
35
+ }
36
+ export const ControllerMixin: Mixin;
37
+
38
+ export default class Controller extends EmberObject {}
39
+ export default interface Controller extends ControllerMixin {}
40
+
41
+ export function inject(): Controller;
42
+ export function inject<K extends keyof Registry>(name: K): Registry[K] & BasicComputedProperty;
43
+ export function inject(target: object, propertyKey: string | symbol): void;
44
+
45
+ // A type registry for Ember `Controller`s. Meant to be declaration-merged
46
+ // so string lookups resolve to the correct type.
47
+ export interface Registry {}
48
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,13 @@
1
+ declare module '@ember/debug/container-debug-adapter' {
2
+ import type { Resolver } from '@ember/-internals/resolver';
3
+
4
+ /**
5
+ * The ContainerDebugAdapter helps the container and resolver interface
6
+ * with tools that debug Ember such as the Ember Inspector for Chrome and Firefox.
7
+ */
8
+ export default class ContainerDebugAdapter extends Object {
9
+ resolver: Resolver;
10
+ canCatalogEntriesByType(type: string): boolean;
11
+ catalogEntriesByType(type: string): string[];
12
+ }
13
+ }
@@ -0,0 +1,64 @@
1
+ declare module '@ember/debug/data-adapter' {
2
+ import ContainerDebugAdapter from '@ember/debug/container-debug-adapter';
3
+ import EmberObject from '@ember/object';
4
+
5
+ namespace DataAdapter {
6
+ interface Column {
7
+ name: string;
8
+ desc: string;
9
+ }
10
+ interface WrappedRecord {
11
+ columnValues: object;
12
+ object: object;
13
+ }
14
+ interface WrappedType {
15
+ type: {
16
+ name: string;
17
+ count: number;
18
+ columns: Column[];
19
+ object: typeof Object;
20
+ };
21
+ release: () => void;
22
+ }
23
+ }
24
+
25
+ /**
26
+ * The `DataAdapter` helps a data persistence library
27
+ * interface with tools that debug Ember such as Chrome and Firefox.
28
+ */
29
+ export default class DataAdapter extends EmberObject {
30
+ /**
31
+ * The container-debug-adapter which is used
32
+ * to list all models.
33
+ */
34
+ containerDebugAdapter: ContainerDebugAdapter;
35
+ /**
36
+ * Ember Data > v1.0.0-beta.18
37
+ * requires string model names to be passed
38
+ * around instead of the actual factories.
39
+ */
40
+ acceptsModelName: boolean;
41
+ /**
42
+ * Specifies how records can be filtered.
43
+ * Records returned will need to have a `filterValues`
44
+ * property with a key for every name in the returned array.
45
+ */
46
+ getFilters(): DataAdapter.Column[];
47
+ /**
48
+ * Fetch the model types and observe them for changes.
49
+ */
50
+ watchModelTypes(
51
+ typesAdded: (types: DataAdapter.WrappedType[]) => void,
52
+ typesUpdated: (types: DataAdapter.WrappedType[]) => void
53
+ ): () => void;
54
+ /**
55
+ * Fetch the records of a given type and observe them for changes.
56
+ */
57
+ watchRecords(
58
+ modelName: string,
59
+ recordsAdded: (records: DataAdapter.WrappedRecord[]) => void,
60
+ recordsUpdated: (records: DataAdapter.WrappedRecord[]) => void,
61
+ recordsRemoved: (idx: number, count: number) => void
62
+ ): () => void;
63
+ }
64
+ }
@@ -0,0 +1,98 @@
1
+ declare module '@ember/debug' {
2
+ /**
3
+ * Define an assertion that will throw an exception if the condition is not met.
4
+ */
5
+ export function assert(desc: string): never;
6
+ export function assert(desc: string, test: unknown): asserts test;
7
+
8
+ /**
9
+ * Display a debug notice.
10
+ */
11
+ export function debug(message: string): void;
12
+
13
+ /**
14
+ * Allows for runtime registration of handler functions that override the default deprecation behavior.
15
+ * Deprecations are invoked by calls to [Ember.deprecate](http://emberjs.com/api/classes/Ember.html#method_deprecate).
16
+ * The following example demonstrates its usage by registering a handler that throws an error if the
17
+ * message contains the word "should", otherwise defers to the default handler.
18
+ */
19
+ export function registerDeprecationHandler(
20
+ handler: (
21
+ message: string,
22
+ options: { id: string; until: string } | undefined,
23
+ next: (message: string, options?: { id: string; until: string }) => void
24
+ ) => void
25
+ ): void;
26
+ /**
27
+ * Allows for runtime registration of handler functions that override the default warning behavior.
28
+ * Warnings are invoked by calls made to [Ember.warn](http://emberjs.com/api/classes/Ember.html#method_warn).
29
+ * The following example demonstrates its usage by registering a handler that does nothing overriding Ember's
30
+ * default warning behavior.
31
+ */
32
+ export function registerWarnHandler(
33
+ handler: (
34
+ message: string,
35
+ options: { id: string } | undefined,
36
+ next: (message: string, options?: { id: string }) => void
37
+ ) => void
38
+ ): void;
39
+
40
+ /**
41
+ * Run a function meant for debugging.
42
+ */
43
+ export function runInDebug(func: () => unknown): void;
44
+
45
+ /**
46
+ * Display a warning with the provided message.
47
+ */
48
+ export function warn(message: string, test: boolean, options: { id: string }): void;
49
+ export function warn(message: string, options: { id: string }): void;
50
+
51
+ /**
52
+ * Display a deprecation warning with the provided message and a stack trace
53
+ * (Chrome and Firefox only).
54
+ *
55
+ * In a production build, this method is defined as an empty function (NOP).
56
+ * Uses of this method in Ember itself are stripped from the ember.prod.js build.
57
+ *
58
+ * @param message A description of the deprecation.
59
+ * @param test If falsy, the deprecation will be displayed.
60
+ * @param options The deprecation options.
61
+ */
62
+ export function deprecate(
63
+ message: string,
64
+ test: boolean,
65
+ options: {
66
+ /**
67
+ * A unique id for this deprecation. The id can be used by Ember debugging
68
+ * tools to change the behavior (raise, log or silence) for that specific
69
+ * deprecation. The id should be namespaced by dots, e.g.
70
+ * `"view.helper.select"`.
71
+ */
72
+ id: string;
73
+ /**
74
+ * The version of Ember when this deprecation warning will be removed.
75
+ */
76
+ until: string;
77
+ /**
78
+ * An optional url to the transition guide on the emberjs.com website.
79
+ */
80
+ url?: string | undefined;
81
+ /**
82
+ * A namespace for the deprecation, usually the package name.
83
+ */
84
+ for: string;
85
+ /**
86
+ * Describes when the deprecation became available and enabled.
87
+ */
88
+ since: Available | Enabled;
89
+ }
90
+ ): void;
91
+
92
+ export interface Available {
93
+ available: string;
94
+ }
95
+ export interface Enabled extends Available {
96
+ enabled: string;
97
+ }
98
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,23 @@
1
+ declare module '@ember/destroyable' {
2
+ export function associateDestroyableChild<T extends object>(parent: object, child: T): T;
3
+
4
+ export function isDestroying(destroyable: object): boolean;
5
+
6
+ export function isDestroyed(destroyable: object): boolean;
7
+
8
+ export function destroy(destroyable: object): void;
9
+
10
+ export function assertDestroyablesDestroyed(): void;
11
+
12
+ export function enableDestroyableTracking(): void;
13
+
14
+ export function registerDestructor<T extends object>(
15
+ destroyable: T,
16
+ destructor: (destroyable: T) => void
17
+ ): (destroyable: T) => void;
18
+
19
+ export function unregisterDestructor<T extends object>(
20
+ destroyable: T,
21
+ destructor: (destroyable: T) => void
22
+ ): void;
23
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,17 @@
1
+ declare module '@ember/engine/-private/container-proxy-mixin' {
2
+ import Owner from '@ember/owner';
3
+ import Mixin from '@ember/object/mixin';
4
+
5
+ /**
6
+ * Given a fullName return a factory manager.
7
+ */
8
+ interface ContainerProxyMixin extends Owner {
9
+ /**
10
+ * Returns an object that can be used to provide an owner to a
11
+ * manually created instance.
12
+ */
13
+ ownerInjection(): {};
14
+ }
15
+ const ContainerProxyMixin: Mixin;
16
+ export default ContainerProxyMixin;
17
+ }
@@ -0,0 +1,54 @@
1
+ declare module '@ember/engine/-private/registry-proxy-mixin' {
2
+ import Owner from '@ember/owner';
3
+ import Mixin from '@ember/object/mixin';
4
+
5
+ /**
6
+ * RegistryProxyMixin is used to provide public access to specific
7
+ * registry functionality.
8
+ */
9
+ interface RegistryProxyMixin extends Owner {
10
+ /**
11
+ * Given a fullName return the corresponding factory.
12
+ */
13
+ resolveRegistration(fullName: string): unknown;
14
+ /**
15
+ * Unregister a factory.
16
+ */
17
+ unregister(fullName: string): unknown;
18
+ /**
19
+ * Check if a factory is registered.
20
+ */
21
+ hasRegistration(fullName: string): boolean;
22
+ /**
23
+ * Register an option for a particular factory.
24
+ */
25
+ registerOption(fullName: string, optionName: string, options: {}): unknown;
26
+ /**
27
+ * Return a specific registered option for a particular factory.
28
+ */
29
+ registeredOption(fullName: string, optionName: string): {};
30
+ /**
31
+ * Register options for a particular factory.
32
+ */
33
+ registerOptions(fullName: string, options: {}): unknown;
34
+ /**
35
+ * Return registered options for a particular factory.
36
+ */
37
+ registeredOptions(fullName: string): {};
38
+ /**
39
+ * Allow registering options for all factories of a type.
40
+ */
41
+ registerOptionsForType(type: string, options: {}): unknown;
42
+ /**
43
+ * Return the registered options for all factories of a type.
44
+ */
45
+ registeredOptionsForType(type: string): {};
46
+ /**
47
+ * Define a dependency injection onto a specific factory or all factories
48
+ * of a type.
49
+ */
50
+ inject(factoryNameOrType: string, property: string, injectionName: string): unknown;
51
+ }
52
+ const RegistryProxyMixin: Mixin;
53
+ export default RegistryProxyMixin;
54
+ }
@@ -0,0 +1,8 @@
1
+ declare module '@ember/engine/-private/types/initializer' {
2
+ export default interface Initializer<T> {
3
+ name: string;
4
+ before?: string[] | undefined;
5
+ after?: string[] | undefined;
6
+ initialize(application: T): void;
7
+ }
8
+ }
@@ -0,0 +1,45 @@
1
+ declare module '@ember/engine' {
2
+ import EmberObject from '@ember/object';
3
+ import type RegistryProxyMixin from '@ember/engine/-private/registry-proxy-mixin';
4
+ import type Initializer from '@ember/engine/-private/types/initializer';
5
+ import type EngineInstance from '@ember/engine/instance';
6
+ import type { Resolver } from '@ember/-internals/resolver';
7
+
8
+ /**
9
+ * The `Engine` class contains core functionality for both applications and
10
+ * engines.
11
+ */
12
+ export default class Engine extends EmberObject {
13
+ /**
14
+ * The goal of initializers should be to register dependencies and injections.
15
+ * This phase runs once. Because these initializers may load code, they are
16
+ * allowed to defer application readiness and advance it. If you need to access
17
+ * the container or store you should use an InstanceInitializer that will be run
18
+ * after all initializers and therefore after all code is loaded and the app is
19
+ * ready.
20
+ */
21
+ static initializer(initializer: Initializer<Engine>): void;
22
+ /**
23
+ * Instance initializers run after all initializers have run. Because
24
+ * instance initializers run after the app is fully set up. We have access
25
+ * to the store, container, and other items. However, these initializers run
26
+ * after code has loaded and are not allowed to defer readiness.
27
+ */
28
+ static instanceInitializer(instanceInitializer: Initializer<EngineInstance>): void;
29
+ /**
30
+ * Set this to provide an alternate class to `DefaultResolver`
31
+ */
32
+ resolver: Resolver | null;
33
+ /**
34
+ * Create an EngineInstance for this Engine.
35
+ */
36
+ buildInstance(options?: object): EngineInstance;
37
+ }
38
+
39
+ export default interface Engine extends RegistryProxyMixin {}
40
+
41
+ /**
42
+ * `getEngineParent` retrieves an engine instance's parent instance.
43
+ */
44
+ export function getEngineParent(engine: EngineInstance): EngineInstance;
45
+ }
@@ -0,0 +1,24 @@
1
+ declare module '@ember/engine/instance' {
2
+ import ContainerProxyMixin from '@ember/engine/-private/container-proxy-mixin';
3
+ import RegistryProxyMixin from '@ember/engine/-private/registry-proxy-mixin';
4
+ import EmberObject from '@ember/object';
5
+
6
+ /**
7
+ * The `EngineInstance` encapsulates all of the stateful aspects of a
8
+ * running `Engine`.
9
+ */
10
+ export default class EngineInstance extends EmberObject {
11
+ /**
12
+ * Unregister a factory.
13
+ */
14
+ unregister(fullName: string): unknown;
15
+
16
+ /**
17
+ * Initialize the `EngineInstance` and return a promise that resolves
18
+ * with the instance itself when the boot process is complete.
19
+ */
20
+ boot(): Promise<EngineInstance>;
21
+ }
22
+
23
+ export default interface EngineInstance extends RegistryProxyMixin, ContainerProxyMixin {}
24
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,6 @@
1
+ declare module '@ember/error' {
2
+ /**
3
+ * A subclass of the JavaScript Error object for use in Ember.
4
+ */
5
+ export default class EmberError extends Error {}
6
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,49 @@
1
+ declare module '@ember/helper' {
2
+ import type { Opaque } from 'ember/-private/type-utils';
3
+
4
+ // In normal TypeScript, these helpers are essentially opaque tokens that just
5
+ // need to be importable. Declaring them with unique interfaces like this,
6
+ // however, gives tools like Glint (that DO have a richer notion of what they
7
+ // are) a place to install more detailed type information.
8
+ export interface ArrayHelper extends Opaque<'helper:array'> {}
9
+ export interface ConcatHelper extends Opaque<'helper:concat'> {}
10
+ export interface FnHelper extends Opaque<'helper:fn'> {}
11
+ export interface GetHelper extends Opaque<'helper:get'> {}
12
+ export interface HashHelper extends Opaque<'helper:hash'> {}
13
+
14
+ /**
15
+ * Use the `{{array}}` helper to create an array to pass as an option to your components.
16
+ *
17
+ * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/array?anchor=array
18
+ */
19
+ export const array: ArrayHelper;
20
+
21
+ /**
22
+ * Concatenates the given arguments into a string.
23
+ *
24
+ * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/concat?anchor=concat
25
+ */
26
+ export const concat: ConcatHelper;
27
+
28
+ /**
29
+ * The `fn` helper allows you to ensure a function that you are passing off to another component, helper, or modifier
30
+ * has access to arguments that are available in the template.
31
+ *
32
+ * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/fn?anchor=fn
33
+ */
34
+ export const fn: FnHelper;
35
+
36
+ /**
37
+ * Dynamically look up a property on an object.
38
+ *
39
+ * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/get?anchor=get
40
+ */
41
+ export const get: GetHelper;
42
+
43
+ /**
44
+ * Use the `{{hash}}` helper to create a hash to pass as an option to your components.
45
+ *
46
+ * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/hash?anchor=hash
47
+ */
48
+ export const hash: HashHelper;
49
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,33 @@
1
+ declare module '@ember/modifier' {
2
+ import type Owner from '@ember/owner';
3
+ import type { Opaque } from 'ember/-private/type-utils';
4
+
5
+ // In normal TypeScript, this modifier is essentially an opaque token
6
+ // that just needs to be importable. Declaring it with a unique interface
7
+ // like this, however, gives tools like Glint (that DO have a richer
8
+ // notion of what it is) a place to install more detailed type information.
9
+ export interface OnModifier extends Opaque<'modifier:on'> {}
10
+
11
+ /**
12
+ * The `{{on}}` modifier lets you easily add event listeners.
13
+ *
14
+ * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/on?anchor=on
15
+ */
16
+ export const on: OnModifier;
17
+
18
+ /**
19
+ * Given a modifier manager factory and a modifier, tell Ember to set the
20
+ * manager returned by that factory as the manager for the modifier.
21
+ *
22
+ * @param factory A function which takes an `owner` and returns a [modifier
23
+ * manager](https://emberjs.github.io/rfcs/0373-Element-Modifier-Managers.html).
24
+ * @param modifier The modifier definition to associate with the manager.
25
+ */
26
+ export function setModifierManager<T>(factory: (owner: Owner) => unknown, modifier: T): T;
27
+
28
+ /**
29
+ * Given a target version of Ember, return an opaque token which Ember can use
30
+ * to determine what a given modifier manager supports.
31
+ */
32
+ export function capabilities(version: string): unknown;
33
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../tsconfig.json"
3
+ }
@@ -0,0 +1,31 @@
1
+ declare module '@ember/object/-private/action-handler' {
2
+ import { AnyFn } from 'ember/-private/type-utils';
3
+ import type Mixin from '@ember/object/mixin';
4
+
5
+ interface ActionsHash {
6
+ [index: string]: AnyFn;
7
+ }
8
+
9
+ /**
10
+ * Ember.ActionHandler is available on some familiar classes including Ember.Route,
11
+ * Ember.Component, and Ember.Controller. (Internally the mixin is used by Ember.CoreView,
12
+ * Ember.ControllerMixin, and Ember.Route and available to the above classes through inheritance.)
13
+ */
14
+ interface ActionHandler {
15
+ /**
16
+ * Triggers a named action on the ActionHandler. Any parameters supplied after the actionName
17
+ * string will be passed as arguments to the action target function.
18
+ *
19
+ * If the ActionHandler has its target property set, actions may bubble to the target.
20
+ * Bubbling happens when an actionName can not be found in the ActionHandler's actions
21
+ * hash or if the action target function returns true.
22
+ */
23
+ send(actionName: string, ...args: any[]): void;
24
+ /**
25
+ * The collection of functions, keyed by name, available on this ActionHandler as action targets.
26
+ */
27
+ actions: ActionsHash;
28
+ }
29
+ const ActionHandler: Mixin;
30
+ export default ActionHandler;
31
+ }