1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | import Rsvp from 'rsvp';
|
12 |
|
13 | import { TemplateFactory } from 'htmlbars-inline-precompile';
|
14 |
|
15 | import { Registry as ServiceRegistry } from '@ember/service';
|
16 | import { Registry as ControllerRegistry } from '@ember/controller';
|
17 | import * as EmberStringNs from '@ember/string';
|
18 | import * as EmberTemplateNs from '@ember/template';
|
19 | import * as EmberTemplateHandlebarsNs from '@ember/template/-private/handlebars';
|
20 |
|
21 | import * as EmberServiceNs from '@ember/service';
|
22 | import * as EmberPolyfillsNs from '@ember/polyfills';
|
23 | import * as EmberUtilsNs from '@ember/utils';
|
24 | import * as EmberRunloopNs from '@ember/runloop';
|
25 | import * as EmberObjectNs from '@ember/object';
|
26 | import * as EmberObjectObserversNs from '@ember/object/observers';
|
27 | import * as EmberObjectMixinNs from '@ember/object/mixin';
|
28 | import * as EmberObjectProxyNs from '@ember/object/proxy';
|
29 | import * as EmberObjectPromiseProxyNs from '@ember/object/promise-proxy-mixin';
|
30 | import * as EmberObjectInternalsNs from '@ember/object/internals';
|
31 | import * as EmberObjectComputedNs from '@ember/object/computed';
|
32 | import * as EmberObjectEventedNs from '@ember/object/evented';
|
33 | import * as EmberObjectEventsNs from '@ember/object/events';
|
34 |
|
35 | import * as EmberDebugNs from '@ember/debug';
|
36 | import _ContainerDebugAdapter from '@ember/debug/container-debug-adapter';
|
37 | import EmberDataAdapter from '@ember/debug/data-adapter';
|
38 |
|
39 | import * as EmberEngineNs from '@ember/engine';
|
40 | import * as EmberEngineInstanceNs from '@ember/engine/instance';
|
41 | import _ContainerProxyMixin from '@ember/engine/-private/container-proxy-mixin';
|
42 | import _RegistryProxyMixin from '@ember/engine/-private/registry-proxy-mixin';
|
43 | import EmberCoreObject from '@ember/object/core';
|
44 | import * as EmberApplicationNs from '@ember/application';
|
45 | import * as EmberApplicationInstanceNs from '@ember/application/instance';
|
46 | import * as EmberApplicationDeprecateNs from '@ember/application/deprecations';
|
47 | import * as EmberTestNs from '@ember/test';
|
48 |
|
49 | import * as EmberControllerNs from '@ember/controller';
|
50 |
|
51 | import EmberMixin from '@ember/object/mixin';
|
52 | import EmberObservable from '@ember/object/observable';
|
53 |
|
54 | import * as EmberArrayNs from '@ember/array';
|
55 | import EmberMutableArray from '@ember/array/mutable';
|
56 | import EmberNativeArray from '@ember/array/-private/native-array';
|
57 | import EmberArrayProxy from '@ember/array/proxy';
|
58 | import EmberEnumerable from '@ember/array/-private/enumerable';
|
59 | import EmberMutableEnumerable from '@ember/array/-private/mutable-enumerable';
|
60 | import EmberArrayProtoExtensions from '@ember/array/types/prototype-extensions';
|
61 |
|
62 | import EmberError from '@ember/error';
|
63 |
|
64 | type EmberArray<T> = EmberArrayNs.default<T>;
|
65 | import EmberActionHandler from '@ember/object/-private/action-handler';
|
66 | import EmberComponent from '@ember/component';
|
67 | import EmberHelper from '@ember/component/helper';
|
68 |
|
69 | import EmberRoutingRouter from '@ember/routing/router';
|
70 | import EmberRoutingRoute from '@ember/routing/route';
|
71 | import EmberRoutingTransition from '@ember/routing/-private/transition';
|
72 | import EmberRoutingRouterService from '@ember/routing/router-service';
|
73 | import EmberRoutingHashLocation from '@ember/routing/hash-location';
|
74 | import EmberRoutingAutoLocation from '@ember/routing/auto-location';
|
75 | import EmberRoutingHistoryLocation from '@ember/routing/history-location';
|
76 | import EmberRoutingNoneLocation from '@ember/routing/none-location';
|
77 |
|
78 | import EmberEventDispatcher from '@ember/application/-private/event-dispatcher';
|
79 | import EmberRegistry from '@ember/application/-private/registry';
|
80 |
|
81 | import EmberTestAdapter from '@ember/test/adapter';
|
82 |
|
83 | export namespace Ember {
|
84 | const A: typeof EmberArrayNs.A;
|
85 | const isArray: typeof EmberArrayNs.isArray;
|
86 | type Enumerable<T> = EmberEnumerable<T>;
|
87 | const Enumerable: typeof EmberEnumerable;
|
88 | class ArrayProxy<T> extends EmberArrayProxy<T> {}
|
89 | type Array<T> = EmberArray<T>;
|
90 | const Array: typeof EmberArrayNs.default;
|
91 | type MutableArray<T> = EmberMutableArray<T>;
|
92 | const MutableArray: typeof EmberMutableArray;
|
93 | type NativeArray<T> = EmberNativeArray<T>;
|
94 | const NativeArray: typeof EmberNativeArray;
|
95 | type MutableEnumerable<T> = EmberMutableEnumerable<T>;
|
96 | const MutableEnumerable: typeof EmberMutableEnumerable;
|
97 | class Router extends EmberRoutingRouter {}
|
98 | class Route extends EmberRoutingRoute {}
|
99 | const ActionHandler: typeof EmberActionHandler;
|
100 | class Controller extends EmberControllerNs.default {}
|
101 | class Component extends EmberComponent {}
|
102 | class Helper extends EmberHelper {}
|
103 |
|
104 | class HashLocation extends EmberRoutingHashLocation {}
|
105 | class NoneLocation extends EmberRoutingNoneLocation {}
|
106 | class HistoryLocation extends EmberRoutingHistoryLocation {}
|
107 | const deprecateFunc: typeof EmberApplicationDeprecateNs.deprecateFunc;
|
108 | const deprecate: typeof EmberApplicationDeprecateNs.deprecate;
|
109 | const getOwner: typeof EmberApplicationNs.getOwner;
|
110 | const setOwner: typeof EmberApplicationNs.setOwner;
|
111 | class EventDispatcher extends EmberEventDispatcher {}
|
112 | class Registry extends EmberRegistry {}
|
113 | interface ArrayPrototypeExtensions<T> extends EmberArrayProtoExtensions<T> {}
|
114 |
|
115 | |
116 |
|
117 |
|
118 |
|
119 | interface Comparable {
|
120 | compare(a: unknown, b: unknown): number;
|
121 | }
|
122 | const Comparable: EmberMixin<Comparable>;
|
123 | class ComputedProperty<Get, Set = Get> extends EmberObjectComputedNs.default<Get, Set> {}
|
124 | |
125 |
|
126 |
|
127 | class Container {
|
128 | |
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 | factoryFor(fullName: string, options?: {}): unknown;
|
135 | }
|
136 | class ContainerDebugAdapter extends _ContainerDebugAdapter {}
|
137 |
|
138 |
|
139 | class Object extends EmberObjectNs.default {}
|
140 | class ObjectProxy extends EmberObjectProxyNs.default {}
|
141 | const Observable: typeof EmberObservable;
|
142 | const PromiseProxyMixin: typeof EmberObjectPromiseProxyNs.default;
|
143 | class CoreObject extends EmberCoreObject {}
|
144 | class DataAdapter extends EmberDataAdapter {}
|
145 | const Debug: {
|
146 | registerDeprecationHandler: typeof EmberDebugNs.registerDeprecationHandler;
|
147 | registerWarnHandler: typeof EmberDebugNs.registerWarnHandler;
|
148 | };
|
149 | class EngineInstance extends EmberEngineInstanceNs.default {}
|
150 | class Engine extends EmberEngineNs.default {}
|
151 |
|
152 | |
153 |
|
154 |
|
155 | const Error: typeof EmberError;
|
156 |
|
157 | const Evented: typeof EmberObjectEventedNs.default;
|
158 |
|
159 | class Mixin<T, Base = EmberObjectNs.default> extends EmberMixin<T, Base> {}
|
160 |
|
161 | |
162 |
|
163 |
|
164 |
|
165 |
|
166 | class Namespace extends Object {}
|
167 |
|
168 | class Service extends Object {}
|
169 |
|
170 | interface ViewTargetActionSupport {
|
171 | target: unknown;
|
172 | actionContext: unknown;
|
173 | }
|
174 | const ViewTargetActionSupport: Mixin<ViewTargetActionSupport>;
|
175 | const ViewUtils: {
|
176 | isSimpleClick(event: Event): boolean;
|
177 | };
|
178 |
|
179 |
|
180 | const RSVP: typeof Rsvp;
|
181 | namespace RSVP {
|
182 | type Promise<T> = Rsvp.Promise<T>;
|
183 | }
|
184 | class Application extends EmberApplicationNs.default {}
|
185 | class ApplicationInstance extends EmberApplicationInstanceNs.default {}
|
186 | |
187 |
|
188 |
|
189 | namespace Test {
|
190 | class Adapter extends EmberTestAdapter {}
|
191 | const registerHelper: typeof EmberTestNs.registerHelper;
|
192 | const unregisterHelper: typeof EmberTestNs.unregisterHelper;
|
193 | const registerWaiter: typeof EmberTestNs.registerWaiter;
|
194 | const unregisterWaiter: typeof EmberTestNs.unregisterWaiter;
|
195 | const registerAsyncHelper: typeof EmberTestNs.registerAsyncHelper;
|
196 | |
197 |
|
198 |
|
199 |
|
200 | function onInjectHelpers(callback: (app: Application) => void): void;
|
201 | |
202 |
|
203 |
|
204 |
|
205 |
|
206 | function promise<T>(
|
207 | resolver: (
|
208 | resolve: (value?: T | PromiseLike<T>) => void,
|
209 | reject: (reason?: unknown) => void
|
210 | ) => void,
|
211 | label?: string
|
212 | ): Promise<T>;
|
213 | |
214 |
|
215 |
|
216 |
|
217 |
|
218 | function resolve<T>(value?: T | PromiseLike<T>, label?: string): Promise<T>;
|
219 |
|
220 | |
221 |
|
222 |
|
223 |
|
224 |
|
225 | function checkWaiters(): boolean;
|
226 | |
227 |
|
228 |
|
229 |
|
230 | const adapter: EmberTestAdapter;
|
231 |
|
232 | |
233 |
|
234 |
|
235 |
|
236 | class QUnitAdapter extends EmberTestAdapter {}
|
237 | class Promise<T> extends Rsvp.Promise<T> {
|
238 | constructor(
|
239 | executor: (
|
240 | resolve: (value?: T | PromiseLike<T>) => void,
|
241 | reject: (reason?: unknown) => void
|
242 | ) => void
|
243 | );
|
244 | }
|
245 | }
|
246 | /**
|
247 | * Namespace for injection helper methods.
|
248 | */
|
249 | namespace inject {
|
250 | |
251 |
|
252 |
|
253 |
|
254 | function controller(): ComputedProperty<Controller>;
|
255 | function controller<K extends keyof ControllerRegistry>(
|
256 | name: K
|
257 | ): ComputedProperty<ControllerRegistry[K]>;
|
258 | const service: typeof EmberServiceNs.inject;
|
259 | }
|
260 | namespace ENV {
|
261 | const EXTEND_PROTOTYPES: {
|
262 | Array: boolean;
|
263 | Function: boolean;
|
264 | String: boolean;
|
265 | };
|
266 | const LOG_BINDINGS: boolean;
|
267 | const LOG_STACKTRACE_ON_DEPRECATION: boolean;
|
268 | const LOG_VERSION: boolean;
|
269 | const MODEL_FACTORY_INJECTIONS: boolean;
|
270 | const RAISE_ON_DEPRECATION: boolean;
|
271 | }
|
272 | namespace Handlebars {
|
273 | function compile(string: string): (...args: any[]) => any;
|
274 | function compile(environment: any, options?: any, context?: any, asObject?: any): any;
|
275 | function precompile(string: string, options: any): void;
|
276 | class Compiler {}
|
277 | class JavaScriptCompiler {}
|
278 | function registerPartial(name: string, str: any): void;
|
279 | function createFrame(objec: any): any;
|
280 | function Exception(message: string): void;
|
281 | class SafeString extends EmberTemplateHandlebarsNs.SafeString {}
|
282 | function parse(string: string): any;
|
283 | function print(ast: any): void;
|
284 | function log(level: string, str: string): void;
|
285 | function registerHelper(name: string, helper: any): void;
|
286 | }
|
287 | namespace String {
|
288 | const camelize: typeof EmberStringNs.camelize;
|
289 | const capitalize: typeof EmberStringNs.capitalize;
|
290 | const classify: typeof EmberStringNs.classify;
|
291 | const dasherize: typeof EmberStringNs.dasherize;
|
292 | const decamelize: typeof EmberStringNs.decamelize;
|
293 | function fmt(...args: string[]): string;
|
294 | const htmlSafe: typeof EmberTemplateNs.htmlSafe;
|
295 | const isHTMLSafe: typeof EmberTemplateNs.isHTMLSafe;
|
296 | const underscore: typeof EmberStringNs.underscore;
|
297 | const w: typeof EmberStringNs.w;
|
298 | }
|
299 | namespace Template {
|
300 | const htmlSafe: typeof EmberTemplateNs.htmlSafe;
|
301 | const isHTMLSafe: typeof EmberTemplateNs.isHTMLSafe;
|
302 | }
|
303 | const computed: typeof EmberObjectNs.computed & typeof EmberObjectComputedNs;
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 | type EmberRunloop = typeof EmberRunloopNs;
|
310 |
|
311 | type RunFn = EmberRunloop['run'];
|
312 |
|
313 |
|
314 |
|
315 | interface Run extends RunFn, EmberRunloop {}
|
316 | const run: Run;
|
317 |
|
318 | const platform: {
|
319 | defineProperty: boolean;
|
320 | hasPropertyAccessors: boolean;
|
321 | };
|
322 |
|
323 | |
324 |
|
325 |
|
326 | function getEngineParent(engine: EngineInstance): EngineInstance;
|
327 |
|
328 | const assert: typeof EmberDebugNs.assert;
|
329 | const debug: typeof EmberDebugNs.debug;
|
330 | const defineProperty: typeof EmberObjectNs.defineProperty;
|
331 |
|
332 | const runInDebug: typeof EmberDebugNs.runInDebug;
|
333 | const warn: typeof EmberDebugNs.warn;
|
334 | const cacheFor: typeof EmberObjectInternalsNs.cacheFor;
|
335 | const addListener: typeof EmberObjectEventsNs.addListener;
|
336 | const removeListener: typeof EmberObjectEventsNs.removeListener;
|
337 | const sendEvent: typeof EmberObjectEventsNs.sendEvent;
|
338 | const on: typeof EmberObjectEventedNs.on;
|
339 |
|
340 | const htmlSafe: typeof EmberTemplateNs.htmlSafe;
|
341 | const isHTMLSafe: typeof EmberTemplateNs.isHTMLSafe;
|
342 |
|
343 | const isBlank: typeof EmberUtilsNs.isBlank;
|
344 | const isEmpty: typeof EmberUtilsNs.isEmpty;
|
345 | const isNone: typeof EmberUtilsNs.isNone;
|
346 | const isPresent: typeof EmberUtilsNs.isPresent;
|
347 |
|
348 | const observer: typeof EmberObjectNs.observer;
|
349 | const addObserver: typeof EmberObjectObserversNs.addObserver;
|
350 | const removeObserver: typeof EmberObjectObserversNs.removeObserver;
|
351 | const get: typeof EmberObjectNs.get;
|
352 | const notifyPropertyChange: typeof EmberObjectNs.notifyPropertyChange;
|
353 | const getProperties: typeof EmberObjectNs.getProperties;
|
354 | const setProperties: typeof EmberObjectNs.setProperties;
|
355 | const set: typeof EmberObjectNs.set;
|
356 | const trySet: typeof EmberObjectNs.trySet;
|
357 | const compare: typeof EmberUtilsNs.compare;
|
358 | |
359 |
|
360 |
|
361 |
|
362 | const isEqual: typeof EmberUtilsNs.isEqual;
|
363 | const typeOf: typeof EmberUtilsNs.typeOf;
|
364 |
|
365 | |
366 |
|
367 |
|
368 |
|
369 |
|
370 | const assign: typeof EmberPolyfillsNs.assign;
|
371 | const guidFor: typeof EmberObjectInternalsNs.guidFor;
|
372 |
|
373 | |
374 |
|
375 |
|
376 |
|
377 |
|
378 | let onerror: ((error: Error) => void) | undefined;
|
379 |
|
380 | /**
|
381 | * The semantic version
|
382 | */
|
383 | const VERSION: string;
|
384 | /**
|
385 | * This property indicates whether or not this application is currently in
|
386 | * testing mode. This is set when `setupForTesting` is called on the current
|
387 | * application.
|
388 | */
|
389 | const testing: boolean;
|
390 |
|
391 | const expandProperties: typeof EmberObjectComputedNs.expandProperties;
|
392 | }
|
393 |
|
394 | export default Ember;
|
395 |
|
396 | declare module 'htmlbars-inline-precompile' {
|
397 | interface TemplateFactory {
|
398 | __htmlbars_inline_precompile_template_factory: any;
|
399 | }
|
400 | export default function hbs(tagged: TemplateStringsArray): TemplateFactory;
|
401 | }
|
402 |
|
\ | No newline at end of file |