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