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