ember-source 5.0.0 → 5.1.0-alpha.2

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 (176) hide show
  1. package/build-metadata.json +3 -3
  2. package/dist/ember-template-compiler.js +19 -35
  3. package/dist/ember-template-compiler.map +1 -1
  4. package/dist/ember-testing.js +8 -31
  5. package/dist/ember-testing.map +1 -1
  6. package/dist/ember.debug.js +798 -436
  7. package/dist/ember.debug.map +1 -1
  8. package/dist/header/license.js +1 -1
  9. package/dist/packages/@ember/-internals/glimmer/index.js +44 -89
  10. package/dist/packages/@ember/-internals/metal/index.js +7 -66
  11. package/dist/packages/@ember/-internals/utility-types/index.js +1 -1
  12. package/dist/packages/@ember/array/proxy.js +0 -1
  13. package/dist/packages/@ember/component/template-only.js +15 -27
  14. package/dist/packages/@ember/debug/index.js +6 -30
  15. package/dist/packages/@ember/debug/lib/warn.js +1 -0
  16. package/dist/packages/@ember/helper/index.js +139 -3
  17. package/dist/packages/@ember/modifier/index.js +11 -3
  18. package/dist/packages/@ember/object/core.js +37 -0
  19. package/dist/packages/@ember/object/mixin.js +1 -1
  20. package/dist/packages/@ember/object/proxy.js +1 -0
  21. package/dist/packages/@ember/routing/lib/utils.js +0 -1
  22. package/dist/packages/@ember/routing/route.js +8 -0
  23. package/dist/packages/@ember/routing/router-service.js +0 -1
  24. package/dist/packages/@ember/runloop/-private/backburner.js +10 -0
  25. package/dist/packages/@ember/runloop/index.js +6 -2
  26. package/dist/packages/@ember/test/index.js +5 -3
  27. package/dist/packages/ember/index.js +229 -220
  28. package/dist/packages/ember/version.js +1 -1
  29. package/dist/packages/ember-testing/lib/test/waiters.js +4 -1
  30. package/docs/data.json +478 -327
  31. package/package.json +26 -23
  32. package/types/publish.mjs +147 -354
  33. package/types/stable/@ember/-internals/glimmer/index.d.ts +6 -1
  34. package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +256 -132
  35. package/types/stable/@ember/-internals/glimmer/lib/components/input.d.ts +5 -2
  36. package/types/stable/@ember/-internals/glimmer/lib/components/link-to.d.ts +5 -2
  37. package/types/stable/@ember/-internals/glimmer/lib/components/textarea.d.ts +8 -2
  38. package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +66 -56
  39. package/types/stable/@ember/-internals/glimmer/lib/templates/empty.d.ts +5 -0
  40. package/types/stable/@ember/-internals/glimmer/lib/templates/input.d.ts +5 -0
  41. package/types/stable/@ember/-internals/glimmer/lib/templates/link-to.d.ts +5 -0
  42. package/types/stable/@ember/-internals/glimmer/lib/templates/outlet.d.ts +5 -0
  43. package/types/stable/@ember/-internals/glimmer/lib/templates/root.d.ts +5 -0
  44. package/types/stable/@ember/-internals/glimmer/lib/templates/textarea.d.ts +5 -0
  45. package/types/stable/@ember/-internals/metal/lib/computed.d.ts +2 -1
  46. package/types/stable/@ember/-internals/metal/lib/computed_cache.d.ts +1 -0
  47. package/types/stable/@ember/-internals/metal/lib/get_properties.d.ts +4 -2
  48. package/types/stable/@ember/-internals/metal/lib/set_properties.d.ts +3 -5
  49. package/types/stable/@ember/-internals/utility-types/index.d.ts +5 -0
  50. package/types/stable/@ember/-internals/views/lib/component_lookup.d.ts +8 -1
  51. package/types/stable/@ember/-internals/views/lib/system/action_manager.d.ts +3 -4
  52. package/types/stable/@ember/-internals/views/lib/views/core_view.d.ts +4 -6
  53. package/types/stable/@ember/application/instance.d.ts +1 -1
  54. package/types/stable/@ember/array/index.d.ts +1 -1
  55. package/types/stable/@ember/array/proxy.d.ts +11 -13
  56. package/types/stable/@ember/component/helper.d.ts +6 -1
  57. package/types/stable/@ember/component/template-only.d.ts +36 -1
  58. package/types/stable/@ember/controller/index.d.ts +6 -5
  59. package/types/stable/@ember/debug/data-adapter.d.ts +10 -3
  60. package/types/stable/@ember/debug/index.d.ts +4 -1
  61. package/types/stable/@ember/debug/lib/warn.d.ts +6 -1
  62. package/types/stable/@ember/engine/index.d.ts +2 -1
  63. package/types/stable/@ember/engine/instance.d.ts +2 -1
  64. package/types/stable/@ember/helper/index.d.ts +141 -3
  65. package/types/stable/@ember/modifier/index.d.ts +11 -2
  66. package/types/stable/@ember/object/core.d.ts +14 -9
  67. package/types/stable/@ember/object/index.d.ts +3 -2
  68. package/types/stable/@ember/object/lib/computed/reduce_computed_macros.d.ts +1 -1
  69. package/types/stable/@ember/object/mixin.d.ts +2 -2
  70. package/types/stable/@ember/object/observable.d.ts +21 -1
  71. package/types/stable/@ember/object/proxy.d.ts +26 -2
  72. package/types/stable/@ember/routing/hash-location.d.ts +0 -6
  73. package/types/stable/@ember/routing/history-location.d.ts +0 -6
  74. package/types/stable/@ember/routing/lib/controller_for.d.ts +2 -7
  75. package/types/stable/@ember/routing/lib/router_state.d.ts +10 -6
  76. package/types/stable/@ember/routing/lib/routing-service.d.ts +3 -3
  77. package/types/stable/@ember/routing/lib/utils.d.ts +14 -15
  78. package/types/stable/@ember/routing/location-ext.d.ts +18 -0
  79. package/types/stable/@ember/routing/location.d.ts +0 -6
  80. package/types/stable/@ember/routing/none-location.d.ts +0 -6
  81. package/types/stable/@ember/routing/owner-ext.d.ts +11 -0
  82. package/types/stable/@ember/routing/route.d.ts +39 -24
  83. package/types/stable/@ember/routing/router-service.d.ts +18 -15
  84. package/types/stable/@ember/routing/router.d.ts +42 -44
  85. package/types/stable/@ember/routing/service-ext.d.ts +14 -0
  86. package/types/stable/@ember/runloop/-private/backburner.d.ts +7 -0
  87. package/types/stable/@ember/runloop/index.d.ts +12 -4
  88. package/types/stable/@ember/service/index.d.ts +20 -7
  89. package/types/stable/@ember/service/owner-ext.d.ts +11 -0
  90. package/types/stable/@ember/template-compilation/index.d.ts +16 -1
  91. package/types/stable/@ember/test/index.d.ts +6 -6
  92. package/types/stable/@ember/utils/lib/compare.d.ts +1 -1
  93. package/types/stable/ember/index.d.ts +320 -246
  94. package/types/stable/ember/version.d.ts +4 -0
  95. package/types/stable/ember-template-compiler/index.d.ts +1 -8
  96. package/types/stable/ember-template-compiler/lib/types.d.ts +20 -0
  97. package/types/stable/ember-testing/lib/adapters/adapter.d.ts +37 -1
  98. package/types/stable/ember-testing/lib/adapters/qunit.d.ts +18 -3
  99. package/types/stable/ember-testing/lib/test/helpers.d.ts +5 -1
  100. package/types/stable/ember-testing/lib/test/promise.d.ts +1 -1
  101. package/types/stable/index.d.ts +298 -4
  102. package/types/stable/loader/lib/index.d.ts +4 -0
  103. package/types/stable/require.d.ts +4 -0
  104. package/types/preview/@ember/application/-private/event-dispatcher.d.ts +0 -18
  105. package/types/preview/@ember/application/-private/registry.d.ts +0 -15
  106. package/types/preview/@ember/application/index.d.ts +0 -136
  107. package/types/preview/@ember/application/instance.d.ts +0 -9
  108. package/types/preview/@ember/application/types.d.ts +0 -29
  109. package/types/preview/@ember/array/-private/enumerable.d.ts +0 -13
  110. package/types/preview/@ember/array/-private/mutable-enumerable.d.ts +0 -13
  111. package/types/preview/@ember/array/-private/native-array.d.ts +0 -181
  112. package/types/preview/@ember/array/index.d.ts +0 -251
  113. package/types/preview/@ember/array/mutable.d.ts +0 -94
  114. package/types/preview/@ember/array/proxy.d.ts +0 -29
  115. package/types/preview/@ember/component/-private/class-names-support.d.ts +0 -27
  116. package/types/preview/@ember/component/-private/core-view.d.ts +0 -14
  117. package/types/preview/@ember/component/-private/glimmer-interfaces.d.ts +0 -49
  118. package/types/preview/@ember/component/-private/signature-utils.d.ts +0 -107
  119. package/types/preview/@ember/component/-private/view-mixin.d.ts +0 -59
  120. package/types/preview/@ember/component/helper.d.ts +0 -122
  121. package/types/preview/@ember/component/index.d.ts +0 -164
  122. package/types/preview/@ember/component/template-only.d.ts +0 -47
  123. package/types/preview/@ember/controller/index.d.ts +0 -47
  124. package/types/preview/@ember/debug/container-debug-adapter.d.ts +0 -14
  125. package/types/preview/@ember/debug/data-adapter.d.ts +0 -64
  126. package/types/preview/@ember/debug/index.d.ts +0 -98
  127. package/types/preview/@ember/destroyable/index.d.ts +0 -23
  128. package/types/preview/@ember/engine/-private/container-proxy-mixin.d.ts +0 -11
  129. package/types/preview/@ember/engine/-private/registry-proxy-mixin.d.ts +0 -12
  130. package/types/preview/@ember/engine/-private/types/initializer.d.ts +0 -8
  131. package/types/preview/@ember/engine/index.d.ts +0 -45
  132. package/types/preview/@ember/engine/instance.d.ts +0 -25
  133. package/types/preview/@ember/helper/index.d.ts +0 -49
  134. package/types/preview/@ember/modifier/index.d.ts +0 -33
  135. package/types/preview/@ember/object/-private/action-handler.d.ts +0 -31
  136. package/types/preview/@ember/object/-private/types.d.ts +0 -63
  137. package/types/preview/@ember/object/compat.d.ts +0 -9
  138. package/types/preview/@ember/object/computed.d.ts +0 -263
  139. package/types/preview/@ember/object/core.d.ts +0 -89
  140. package/types/preview/@ember/object/evented.d.ts +0 -45
  141. package/types/preview/@ember/object/events.d.ts +0 -47
  142. package/types/preview/@ember/object/index.d.ts +0 -126
  143. package/types/preview/@ember/object/internals.d.ts +0 -17
  144. package/types/preview/@ember/object/mixin.d.ts +0 -19
  145. package/types/preview/@ember/object/observable.d.ts +0 -89
  146. package/types/preview/@ember/object/observers.d.ts +0 -34
  147. package/types/preview/@ember/object/promise-proxy-mixin.d.ts +0 -37
  148. package/types/preview/@ember/object/proxy.d.ts +0 -27
  149. package/types/preview/@ember/routing/-private/router-dsl.d.ts +0 -20
  150. package/types/preview/@ember/routing/hash-location.d.ts +0 -26
  151. package/types/preview/@ember/routing/history-location.d.ts +0 -25
  152. package/types/preview/@ember/routing/index.d.ts +0 -17
  153. package/types/preview/@ember/routing/location.d.ts +0 -104
  154. package/types/preview/@ember/routing/none-location.d.ts +0 -27
  155. package/types/preview/@ember/routing/route-info.d.ts +0 -73
  156. package/types/preview/@ember/routing/route.d.ts +0 -532
  157. package/types/preview/@ember/routing/router-service.d.ts +0 -359
  158. package/types/preview/@ember/routing/router.d.ts +0 -41
  159. package/types/preview/@ember/routing/transition.d.ts +0 -126
  160. package/types/preview/@ember/routing/types.d.ts +0 -15
  161. package/types/preview/@ember/runloop/-private/backburner.d.ts +0 -43
  162. package/types/preview/@ember/runloop/-private/types.d.ts +0 -9
  163. package/types/preview/@ember/runloop/index.d.ts +0 -175
  164. package/types/preview/@ember/runloop/types.d.ts +0 -5
  165. package/types/preview/@ember/service/index.d.ts +0 -32
  166. package/types/preview/@ember/template/-private/handlebars.d.ts +0 -7
  167. package/types/preview/@ember/template/index.d.ts +0 -6
  168. package/types/preview/@ember/template-compilation/index.d.ts +0 -28
  169. package/types/preview/@ember/test/adapter.d.ts +0 -22
  170. package/types/preview/@ember/test/index.d.ts +0 -49
  171. package/types/preview/@ember/utils/-private/types.d.ts +0 -39
  172. package/types/preview/@ember/utils/index.d.ts +0 -42
  173. package/types/preview/ember/-private/type-utils.d.ts +0 -57
  174. package/types/preview/ember/index.d.ts +0 -347
  175. package/types/preview/index.d.ts +0 -121
  176. /package/dist/dependencies/{backburner.js → backburner.js.js} +0 -0
@@ -1,347 +0,0 @@
1
- declare module 'ember' {
2
- // Capitalization is intentional: this makes it much easier to re-export RSVP on
3
- // the Ember namespace.
4
- import Rsvp from 'rsvp';
5
-
6
- import type { Registry as ControllerRegistry } from '@ember/controller';
7
- import type * as EmberTemplateNs from '@ember/template';
8
- import * as EmberTemplateHandlebarsNs from '@ember/template/-private/handlebars';
9
- import type * as EmberServiceNs from '@ember/service';
10
- import type * as EmberUtilsNs from '@ember/utils';
11
- import type * as EmberRunloopNs from '@ember/runloop';
12
- import * as EmberObjectNs from '@ember/object';
13
- import type * as EmberObjectObserversNs from '@ember/object/observers';
14
- import * as EmberObjectProxyNs from '@ember/object/proxy';
15
- import type * as EmberObjectPromiseProxyNs from '@ember/object/promise-proxy-mixin';
16
- import type * as EmberObjectInternalsNs from '@ember/object/internals';
17
- import * as EmberObjectComputedNs from '@ember/object/computed';
18
- import type * as EmberObjectEventedNs from '@ember/object/evented';
19
- import type * as EmberObjectEventsNs from '@ember/object/events';
20
- // @ember/debug
21
- import type * as EmberDebugNs from '@ember/debug';
22
- import _ContainerDebugAdapter from '@ember/debug/container-debug-adapter';
23
- import EmberDataAdapter from '@ember/debug/data-adapter';
24
- // @ember/engine
25
- import * as EmberEngineNs from '@ember/engine';
26
- import * as EmberEngineInstanceNs from '@ember/engine/instance';
27
- import EmberCoreObject from '@ember/object/core';
28
- import * as EmberApplicationNs from '@ember/application';
29
- import * as EmberApplicationInstanceNs from '@ember/application/instance';
30
- import type * as EmberTestNs from '@ember/test';
31
- import * as EmberControllerNs from '@ember/controller';
32
- import EmberMixin from '@ember/object/mixin';
33
- import type EmberObservable from '@ember/object/observable';
34
- // @ember/array
35
- import type * as EmberArrayNs from '@ember/array';
36
- import type EmberMutableArray from '@ember/array/mutable';
37
- import type EmberNativeArray from '@ember/array/-private/native-array';
38
- import EmberArrayProxy from '@ember/array/proxy';
39
- import type EmberEnumerable from '@ember/array/-private/enumerable';
40
- import type EmberMutableEnumerable from '@ember/array/-private/mutable-enumerable';
41
-
42
- type EmberArray<T> = EmberArrayNs.default<T>;
43
- import type EmberActionHandler from '@ember/object/-private/action-handler';
44
- import EmberComponent from '@ember/component';
45
- import EmberHelper from '@ember/component/helper';
46
- // @ember/routing
47
- import EmberRoutingRouter from '@ember/routing/router';
48
- import EmberRoutingRoute from '@ember/routing/route';
49
- import EmberRoutingHashLocation from '@ember/routing/hash-location';
50
- import EmberRoutingHistoryLocation from '@ember/routing/history-location';
51
- import EmberRoutingNoneLocation from '@ember/routing/none-location';
52
- // @ember/application
53
- import EmberEventDispatcher from '@ember/application/-private/event-dispatcher';
54
- import EmberRegistry from '@ember/application/-private/registry';
55
- // @ember/test
56
- import EmberTestAdapter from '@ember/test/adapter';
57
-
58
- namespace Ember {
59
- export const A: typeof EmberArrayNs.A;
60
- export const isArray: typeof EmberArrayNs.isArray;
61
- export type Enumerable = EmberEnumerable;
62
- export const Enumerable: typeof EmberEnumerable;
63
- export class ArrayProxy<T> extends EmberArrayProxy<T> {}
64
- export type Array<T> = EmberArray<T>;
65
- export const Array: typeof EmberArrayNs.default;
66
- export type MutableArray<T> = EmberMutableArray<T>;
67
- export const MutableArray: typeof EmberMutableArray;
68
- export type NativeArray<T> = EmberNativeArray<T>;
69
- export const NativeArray: typeof EmberNativeArray;
70
- export type MutableEnumerable = EmberMutableEnumerable;
71
- export const MutableEnumerable: typeof EmberMutableEnumerable;
72
- export class Router extends EmberRoutingRouter {}
73
- export class Route extends EmberRoutingRoute {}
74
- export const ActionHandler: typeof EmberActionHandler;
75
- export class Controller extends EmberControllerNs.default {}
76
- export class Component extends EmberComponent {}
77
- export class Helper extends EmberHelper {}
78
-
79
- export class HashLocation extends EmberRoutingHashLocation {}
80
- export class NoneLocation extends EmberRoutingNoneLocation {}
81
- export class HistoryLocation extends EmberRoutingHistoryLocation {}
82
- export const deprecate: typeof EmberDebugNs.deprecate;
83
- export const getOwner: typeof EmberApplicationNs.getOwner;
84
- export const setOwner: typeof EmberApplicationNs.setOwner;
85
- export class EventDispatcher extends EmberEventDispatcher {}
86
- export class Registry extends EmberRegistry {}
87
-
88
- /**
89
- * Implements some standard methods for comparing objects. Add this mixin to
90
- * any class you create that can compare its instances.
91
- */
92
- export interface Comparable {
93
- compare(a: unknown, b: unknown): number;
94
- }
95
- const Comparable: EmberMixin;
96
- class ComputedProperty extends EmberObjectComputedNs.default {}
97
- /**
98
- * A container used to instantiate and cache objects.
99
- */
100
- class Container {
101
- /**
102
- * Given a fullName, return the corresponding factory. The consumer of the factory
103
- * is responsible for the destruction of any factory instances, as there is no
104
- * way for the container to ensure instances are destroyed when it itself is
105
- * destroyed.
106
- */
107
- factoryFor(fullName: string, options?: {}): unknown;
108
- }
109
- class ContainerDebugAdapter extends _ContainerDebugAdapter {}
110
-
111
- class Object extends EmberObjectNs.default {}
112
- class ObjectProxy extends EmberObjectProxyNs.default {}
113
- const Observable: typeof EmberObservable;
114
- const PromiseProxyMixin: typeof EmberObjectPromiseProxyNs.default;
115
- interface PromiseProxyMixin<T> extends EmberObjectPromiseProxyNs.default<T> {}
116
- class CoreObject extends EmberCoreObject {}
117
- class DataAdapter extends EmberDataAdapter {}
118
- const Debug: {
119
- registerDeprecationHandler: typeof EmberDebugNs.registerDeprecationHandler;
120
- registerWarnHandler: typeof EmberDebugNs.registerWarnHandler;
121
- };
122
- class EngineInstance extends EmberEngineInstanceNs.default {}
123
- class Engine extends EmberEngineNs.default {}
124
-
125
- const Evented: typeof EmberObjectEventedNs.default;
126
- interface Evented extends EmberObjectEventedNs.default {}
127
-
128
- class Mixin extends EmberMixin {}
129
-
130
- /**
131
- * A Namespace is an object usually used to contain other objects or methods
132
- * such as an application or framework. Create a namespace anytime you want
133
- * to define one of these new containers.
134
- */
135
- class Namespace extends Object {}
136
-
137
- class Service extends Object {}
138
-
139
- interface ViewTargetActionSupport {
140
- target: unknown;
141
- actionContext: unknown;
142
- }
143
- const ViewTargetActionSupport: Mixin;
144
- const ViewUtils: {
145
- isSimpleClick(event: Event): boolean;
146
- };
147
-
148
- // FYI - RSVP source comes from https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/promise.js
149
- const RSVP: typeof Rsvp;
150
- namespace RSVP {
151
- type Promise<T> = Rsvp.Promise<T>;
152
- }
153
- class Application extends EmberApplicationNs.default {}
154
- class ApplicationInstance extends EmberApplicationInstanceNs.default {}
155
- /**
156
- * This is a container for an assortment of testing related functionality
157
- */
158
- namespace Test {
159
- class Adapter extends EmberTestAdapter {}
160
- const registerHelper: typeof EmberTestNs.registerHelper;
161
- const unregisterHelper: typeof EmberTestNs.unregisterHelper;
162
- const registerWaiter: typeof EmberTestNs.registerWaiter;
163
- const unregisterWaiter: typeof EmberTestNs.unregisterWaiter;
164
- const registerAsyncHelper: typeof EmberTestNs.registerAsyncHelper;
165
- /**
166
- * Used to register callbacks to be fired whenever `App.injectTestHelpers`
167
- * is called.
168
- */
169
- function onInjectHelpers(callback: (app: Application) => void): void;
170
- /**
171
- * This returns a thenable tailored for testing. It catches failed
172
- * `onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`
173
- * callback in the last chained then.
174
- */
175
- function promise<T>(
176
- resolver: (
177
- resolve: (value?: T | PromiseLike<T>) => void,
178
- reject: (reason?: unknown) => void
179
- ) => void,
180
- label?: string
181
- ): Promise<T>;
182
- /**
183
- * Replacement for `Ember.RSVP.resolve`
184
- * The only difference is this uses
185
- * an instance of `Ember.Test.Promise`
186
- */
187
- function resolve<T>(value?: T | PromiseLike<T>, label?: string): Promise<T>;
188
-
189
- /**
190
- * Iterates through each registered test waiter, and invokes
191
- * its callback. If any waiter returns false, this method will return
192
- * true indicating that the waiters have not settled yet.
193
- */
194
- function checkWaiters(): boolean;
195
- /**
196
- * Used to allow ember-testing to communicate with a specific testing
197
- * framework.
198
- */
199
- const adapter: EmberTestAdapter;
200
-
201
- /**
202
- * This class implements the methods defined by Ember.Test.Adapter for the
203
- * QUnit testing framework.
204
- */
205
- class QUnitAdapter extends EmberTestAdapter {}
206
- class Promise<T> extends Rsvp.Promise<T> {
207
- constructor(
208
- executor: (
209
- resolve: (value?: T | PromiseLike<T>) => void,
210
- reject: (reason?: unknown) => void
211
- ) => void
212
- );
213
- }
214
- }
215
- /**
216
- * Namespace for injection helper methods.
217
- */
218
- namespace inject {
219
- /**
220
- * Creates a property that lazily looks up another controller in the container.
221
- * Can only be used when defining another controller.
222
- */
223
- function controller(): Controller;
224
- function controller<K extends keyof ControllerRegistry>(
225
- name: K
226
- ): ControllerRegistry[K] & EmberObjectComputedNs.BasicComputedProperty;
227
- const service: typeof EmberServiceNs.inject;
228
- }
229
- namespace ENV {
230
- const EXTEND_PROTOTYPES:
231
- | boolean
232
- | {
233
- Array: boolean;
234
- };
235
- const LOG_BINDINGS: boolean;
236
- const LOG_STACKTRACE_ON_DEPRECATION: boolean;
237
- const LOG_VERSION: boolean;
238
- const MODEL_FACTORY_INJECTIONS: boolean;
239
- const RAISE_ON_DEPRECATION: boolean;
240
- }
241
- namespace Handlebars {
242
- function compile(string: string): (...args: any[]) => any;
243
- function compile(environment: any, options?: any, context?: any, asObject?: any): any;
244
- function precompile(string: string, options: any): void;
245
- class Compiler {}
246
- class JavaScriptCompiler {}
247
- function registerPartial(name: string, str: any): void;
248
- function createFrame(objec: any): any;
249
- function Exception(message: string): void;
250
- class SafeString extends EmberTemplateHandlebarsNs.SafeString {}
251
- function parse(string: string): any;
252
- function print(ast: any): void;
253
- function log(level: string, str: string): void;
254
- function registerHelper(name: string, helper: any): void;
255
- }
256
- namespace Template {
257
- const htmlSafe: typeof EmberTemplateNs.htmlSafe;
258
- const isHTMLSafe: typeof EmberTemplateNs.isHTMLSafe;
259
- }
260
- const computed: typeof EmberObjectNs.computed & typeof EmberObjectComputedNs;
261
-
262
- // Shenanigans to make `run` both callable and a namespace safely, while not
263
- // making the `run.bind` call resolve to `Function.prototype.bind`. (Yes,
264
- // insert :upside-down-smiley: here.)
265
- // 1. Get the type side of the namespace.
266
- type EmberRunloop = typeof EmberRunloopNs;
267
- // 2. Use it to get an interface representing the callable side of `run`.
268
- type RunFn = EmberRunloop['run'];
269
- // type RunFn = Pick<EmberRunloop, 'run'>['run'];
270
- // 3. Merge the two together so that the public-facing type of `run` is both
271
- // the plucked-off run type *and* the namespace.
272
- interface Run extends RunFn, EmberRunloop {}
273
- const run: Run;
274
-
275
- /**
276
- * `getEngineParent` retrieves an engine instance's parent instance.
277
- */
278
- function getEngineParent(engine: EngineInstance): EngineInstance;
279
-
280
- const assert: typeof EmberDebugNs.assert;
281
- const debug: typeof EmberDebugNs.debug;
282
- const defineProperty: typeof EmberObjectNs.defineProperty;
283
-
284
- const runInDebug: typeof EmberDebugNs.runInDebug;
285
- const warn: typeof EmberDebugNs.warn;
286
- const cacheFor: typeof EmberObjectInternalsNs.cacheFor;
287
- const addListener: typeof EmberObjectEventsNs.addListener;
288
- const removeListener: typeof EmberObjectEventsNs.removeListener;
289
- const sendEvent: typeof EmberObjectEventsNs.sendEvent;
290
- const on: typeof EmberObjectEventedNs.on;
291
-
292
- const htmlSafe: typeof EmberTemplateNs.htmlSafe;
293
- const isHTMLSafe: typeof EmberTemplateNs.isHTMLSafe;
294
-
295
- const isBlank: typeof EmberUtilsNs.isBlank;
296
- const isEmpty: typeof EmberUtilsNs.isEmpty;
297
- const isNone: typeof EmberUtilsNs.isNone;
298
- const isPresent: typeof EmberUtilsNs.isPresent;
299
-
300
- const observer: typeof EmberObjectNs.observer;
301
- const addObserver: typeof EmberObjectObserversNs.addObserver;
302
- const removeObserver: typeof EmberObjectObserversNs.removeObserver;
303
- const get: typeof EmberObjectNs.get;
304
- const notifyPropertyChange: typeof EmberObjectNs.notifyPropertyChange;
305
- const getProperties: typeof EmberObjectNs.getProperties;
306
- const setProperties: typeof EmberObjectNs.setProperties;
307
- const set: typeof EmberObjectNs.set;
308
- const trySet: typeof EmberObjectNs.trySet;
309
- const compare: typeof EmberUtilsNs.compare;
310
- /**
311
- * Creates a shallow copy of the passed object. A deep copy of the object is
312
- * returned if the optional `deep` argument is `true`.
313
- */
314
- const isEqual: typeof EmberUtilsNs.isEqual;
315
- const typeOf: typeof EmberUtilsNs.typeOf;
316
- const guidFor: typeof EmberObjectInternalsNs.guidFor;
317
-
318
- /**
319
- * A function may be assigned to `Ember.onerror` to be called when Ember
320
- * internals encounter an error. This is useful for specialized error handling
321
- * and reporting code.
322
- */
323
- let onerror: ((error: Error) => void) | undefined;
324
-
325
- /**
326
- * The semantic version
327
- */
328
- const VERSION: string;
329
- /**
330
- * This property indicates whether or not this application is currently in
331
- * testing mode. This is set when `setupForTesting` is called on the current
332
- * application.
333
- */
334
- const testing: boolean;
335
-
336
- const expandProperties: typeof EmberObjectComputedNs.expandProperties;
337
- }
338
-
339
- export default Ember;
340
- }
341
-
342
- declare module 'htmlbars-inline-precompile' {
343
- interface TemplateFactory {
344
- __htmlbars_inline_precompile_template_factory: any;
345
- }
346
- export default function hbs(tagged: TemplateStringsArray): TemplateFactory;
347
- }
@@ -1,121 +0,0 @@
1
- /**
2
- *Provides **preview** type definitions for Ember.js.*
3
-
4
- These types are maintained by hand and the types provided here are unstable
5
- and subject to change without warning, though we make a best effort to keep
6
- churn to a minimum while we work to stabilize Ember's types.
7
-
8
- To use these type definitions, add these import to any TypeScript file in your
9
- Ember app or addon:
10
-
11
- ```ts
12
- import 'ember-source/types';
13
- import 'ember-source/types/preview';
14
- ```
15
-
16
- As Ember's types become more stable, this will automatically give you the
17
- latest mix of stable and preview types, with no effort from you.
18
-
19
- @module
20
- */
21
-
22
- // This works because each of these modules presents `declare module` definition
23
- // of the module and *only* that, so importing this file in turn makes those
24
- // module declarations "visible" automatically throughout a consuming project.
25
- // Combined with use of `typesVersions` (or, in the future, possibly `exports`)
26
- // in `package.json`, this allows users to import the types without knowing the
27
- // exact layout details.
28
- //
29
- // Somewhat annoyingly, every single module in the graph must appear here. For
30
- // now, while we are publishing ambient types, that means we must maintain this
31
- // by hand. When we start emitting types from the source, we will need to do the
32
- // same work, but automatically.
33
-
34
- import './ember';
35
- import './ember/-private/type-utils';
36
-
37
- import './@ember/application';
38
- import './@ember/application/-private/event-dispatcher';
39
- import './@ember/application/-private/registry';
40
- import './@ember/application/instance';
41
- import './@ember/application/types';
42
-
43
- import './@ember/array';
44
- import './@ember/array/-private/enumerable';
45
- import './@ember/array/-private/mutable-enumerable';
46
- import './@ember/array/-private/native-array';
47
- import './@ember/array/mutable';
48
- import './@ember/array/proxy';
49
-
50
- import './@ember/component';
51
- import './@ember/component/-private/class-names-support';
52
- import './@ember/component/-private/core-view';
53
- import './@ember/component/-private/glimmer-interfaces';
54
- import './@ember/component/-private/signature-utils';
55
- import './@ember/component/-private/view-mixin';
56
- import './@ember/component/helper';
57
- import './@ember/component/template-only';
58
-
59
- import './@ember/controller';
60
-
61
- import './@ember/debug';
62
- import './@ember/debug/container-debug-adapter';
63
- import './@ember/debug/data-adapter';
64
-
65
- import './@ember/destroyable';
66
-
67
- import './@ember/engine';
68
- import './@ember/engine/-private/container-proxy-mixin';
69
- import './@ember/engine/-private/registry-proxy-mixin';
70
- import './@ember/engine/-private/types/initializer';
71
- import './@ember/engine/instance';
72
-
73
- import './@ember/helper';
74
-
75
- import './@ember/modifier';
76
-
77
- import './@ember/object';
78
- import './@ember/object/-private/action-handler';
79
- import './@ember/object/-private/types';
80
- import './@ember/object/compat';
81
- import './@ember/object/computed';
82
- import './@ember/object/core';
83
- import './@ember/object/evented';
84
- import './@ember/object/events';
85
- import './@ember/object/internals';
86
- import './@ember/object/mixin';
87
- import './@ember/object/observable';
88
- import './@ember/object/observers';
89
- import './@ember/object/promise-proxy-mixin';
90
- import './@ember/object/proxy';
91
-
92
- import './@ember/routing';
93
- import './@ember/routing/-private/router-dsl';
94
- import './@ember/routing/location';
95
- import './@ember/routing/hash-location';
96
- import './@ember/routing/history-location';
97
- import './@ember/routing/none-location';
98
- import './@ember/routing/route';
99
- import './@ember/routing/route-info';
100
- import './@ember/routing/router';
101
- import './@ember/routing/router-service';
102
- import './@ember/routing/transition';
103
- import './@ember/routing/types';
104
-
105
- import './@ember/runloop';
106
- import './@ember/runloop/-private/backburner';
107
- import './@ember/runloop/-private/types';
108
- import './@ember/runloop/types';
109
-
110
- import './@ember/service';
111
-
112
- import './@ember/template';
113
- import './@ember/template/-private/handlebars';
114
-
115
- import './@ember/template-compilation';
116
-
117
- import './@ember/test';
118
- import './@ember/test/adapter';
119
-
120
- import './@ember/utils';
121
- import './@ember/utils/-private/types';