diff --git a/ember/ember.d.ts b/ember/ember.d.ts index 2a0b35e420..e50185fd50 100644 --- a/ember/ember.d.ts +++ b/ember/ember.d.ts @@ -38,10 +38,10 @@ declare module EmberTesting { } interface Function { - observes(...string): Function; - observesBefore(...string): Function; - on(...string): Function; - property(...string): Function; + observes(...args: string[]): Function; + observesBefore(...args: string[]): Function; + on(...args: string[]): Function; + property(...args: string[]): Function; } interface String { @@ -50,9 +50,9 @@ interface String { classify(): string; dasherize(): string; decamelize(): string; - fmt(...string): string; + fmt(...args: string[]): string; htmlSafe(): typeof Handlebars.SafeString; - loc(...string): string; + loc(...args: string[]): string; underscore(): string; w(): string[]; } @@ -70,14 +70,14 @@ interface Array { clear(): any[]; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Ember.Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Ember.Enumerable); - enumerableContentDidChange(start: number, removing: Ember.Enumerable, adding: Ember.Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Ember.Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Ember.Enumerable); - enumerableContentDidChange(removing: Ember.Enumerable, adding: Ember.Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Ember.Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Ember.Enumerable): any; + enumerableContentDidChange(start: number, removing: Ember.Enumerable, adding: Ember.Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Ember.Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Ember.Enumerable): any; + enumerableContentDidChange(removing: Ember.Enumerable, adding: Ember.Enumerable): any; enumerableContentWillChange(removing: number, adding: number): any[]; enumerableContentWillChange(removing: Ember.Enumerable, adding: number): any[]; enumerableContentWillChange(removing: number, adding: Ember.Enumerable): any[]; @@ -93,15 +93,15 @@ interface Array { getEach(key: string): any[]; indexOf(object: any, startAt: number): number; insertAt(idx: number, object: any): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; lastIndexOf(object: any, startAt: number): number; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; objectAt(idx: number): any; - objectsAt(...number): any[]; + objectsAt(...args: number[]): any[]; popObject(): any; pushObject(obj: any): any; - pushObjects(...any): any[]; + pushObjects(...args: any[]): any[]; reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any; reject: ItemIndexEnumerableCallbackTarget; rejectBy(key: string, value?: string): any[]; @@ -136,7 +136,7 @@ interface Array { decrementProperty(keyName: string, decrement?: number): number; endPropertyChanges(): any[]; get(keyName: string): any; - getProperties(...string): {}; + getProperties(...args: string[]): {}; getProperties(keys: string[]): {}; getWithDefault(keyName: string, defaultValue: any): any; hasObserverFor(key: string): boolean; @@ -157,13 +157,13 @@ interface ApplicationCreateArguments { customEvents?: {}; rootElement?: string; /** - Basic logging of successful transitions. - **/ - LOG_TRANSITIONS?: boolean; + Basic logging of successful transitions. + **/ + LOG_TRANSITIONS?: boolean; /** - Detailed logging of all routing steps. - **/ - LOG_TRANSITIONS_INTERNAL?: boolean; + Detailed logging of all routing steps. + **/ + LOG_TRANSITIONS_INTERNAL?: boolean; } interface ApplicationInitializerArguments { @@ -177,21 +177,21 @@ interface ApplicationInitializerFunction { interface CoreObjectArguments { /** - An overridable method called when objects are instantiated. By default, does nothing unless it is - overridden during class definition. NOTE: If you do override init for a framework class like Ember.View - or Ember.ArrayController, be sure to call this._super() in your init declaration! If you don't, Ember - may not have an opportunity to do important setup work, and you'll see strange behavior in your application. - **/ - init?: Function; + An overridable method called when objects are instantiated. By default, does nothing unless it is + overridden during class definition. NOTE: If you do override init for a framework class like Ember.View + or Ember.ArrayController, be sure to call this._super() in your init declaration! If you don't, Ember + may not have an opportunity to do important setup work, and you'll see strange behavior in your application. + **/ + init?: Function; /** - Override to implement teardown. - **/ - willDestroy?: Function; + Override to implement teardown. + **/ + willDestroy?: Function; } interface EnumerableConfigurationOptions { - willChange? ; - didChange? ; + willChange?: boolean ; + didChange?: boolean ; } interface ItemIndexEnumerableCallbackTarget { @@ -238,123 +238,123 @@ interface ModifyObserver { declare module Ember { /** - Alias for jQuery. - **/ + Alias for jQuery. + **/ // ReSharper disable once DuplicatingLocalDeclaration var $: JQueryStatic; /** - Creates an Ember.NativeArray from an Array like object. Does not modify the original object. - Ember.A is not needed if Ember.EXTEND_PROTOTYPES is true (the default value). However, it is - recommended that you use Ember.A when creating addons for ember or when you can not garentee - that Ember.EXTEND_PROTOTYPES will be true. - **/ + Creates an Ember.NativeArray from an Array like object. Does not modify the original object. + Ember.A is not needed if Ember.EXTEND_PROTOTYPES is true (the default value). However, it is + recommended that you use Ember.A when creating addons for ember or when you can not garentee + that Ember.EXTEND_PROTOTYPES will be true. + **/ function A(arr?: any[]): NativeArray; /** - An instance of Ember.Application is the starting point for every Ember application. It helps to - instantiate, initialize and coordinate the many objects that make up your app. - **/ + An instance of Ember.Application is the starting point for every Ember application. It helps to + instantiate, initialize and coordinate the many objects that make up your app. + **/ class Application extends Namespace { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; static initializer(arguments?: ApplicationInitializerArguments): void; /** - Call advanceReadiness after any asynchronous setup logic has completed. - Each call to deferReadiness must be matched by a call to advanceReadiness - or the application will never become ready and routing will not begin. - **/ - advanceReadiness(): void; + Call advanceReadiness after any asynchronous setup logic has completed. + Each call to deferReadiness must be matched by a call to advanceReadiness + or the application will never become ready and routing will not begin. + **/ + advanceReadiness(): void; /** - Use this to defer readiness until some condition is true. + Use this to defer readiness until some condition is true. - This allows you to perform asynchronous setup logic and defer - booting your application until the setup has finished. + This allows you to perform asynchronous setup logic and defer + booting your application until the setup has finished. - However, if the setup requires a loading UI, it might be better - to use the router for this purpose. - */ - deferReadiness(): void; + However, if the setup requires a loading UI, it might be better + to use the router for this purpose. + */ + deferReadiness(): void; /** - defines an injection or typeInjection - **/ - inject(factoryNameOrType: string, property: string, injectionName: string): void; + defines an injection or typeInjection + **/ + inject(factoryNameOrType: string, property: string, injectionName: string): void; /** - This injects the test helpers into the window's scope. If a function of the - same name has already been defined it will be cached (so that it can be reset - if the helper is removed with `unregisterHelper` or `removeTestHelpers`). - Any callbacks registered with `onInjectHelpers` will be called once the - helpers have been injected. - **/ - injectTestHelpers(): void; + This injects the test helpers into the window's scope. If a function of the + same name has already been defined it will be cached (so that it can be reset + if the helper is removed with `unregisterHelper` or `removeTestHelpers`). + Any callbacks registered with `onInjectHelpers` will be called once the + helpers have been injected. + **/ + injectTestHelpers(): void; /** - registers a factory for later injection - @param fullName type:name (e.g., 'model:user') - @param factory (e.g., App.Person) - **/ - register(fullName: string, factory: Function, options?: {}): void; + registers a factory for later injection + @param fullName type:name (e.g., 'model:user') + @param factory (e.g., App.Person) + **/ + register(fullName: string, factory: Function, options?: {}): void; /** - This removes all helpers that have been registered, and resets and functions - that were overridden by the helpers. - **/ - removeTestHelpers(): void; + This removes all helpers that have been registered, and resets and functions + that were overridden by the helpers. + **/ + removeTestHelpers(): void; /** - Reset the application. This is typically used only in tests. - **/ - reset(): void; + Reset the application. This is typically used only in tests. + **/ + reset(): void; /** - This hook defers the readiness of the application, so that you can start - the app when your tests are ready to run. It also sets the router's - location to 'none', so that the window's location will not be modified - (preventing both accidental leaking of state between tests and interference - with your testing framework). - **/ - setupForTesting(): void; + This hook defers the readiness of the application, so that you can start + the app when your tests are ready to run. It also sets the router's + location to 'none', so that the window's location will not be modified + (preventing both accidental leaking of state between tests and interference + with your testing framework). + **/ + setupForTesting(): void; /** - The DOM events for which the event dispatcher should listen. - */ + The DOM events for which the event dispatcher should listen. + */ customEvents: {}; /** - The Ember.EventDispatcher responsible for delegating events to this application's views. - **/ + The Ember.EventDispatcher responsible for delegating events to this application's views. + **/ eventDispatcher: EventDispatcher; /** - Set this to provide an alternate class to Ember.DefaultResolver - **/ + Set this to provide an alternate class to Ember.DefaultResolver + **/ resolver: DefaultResolver; /** - The root DOM element of the Application. This can be specified as an - element or a jQuery-compatible selector string. + The root DOM element of the Application. This can be specified as an + element or a jQuery-compatible selector string. - This is the element that will be passed to the Application's, eventDispatcher, - which sets up the listeners for event delegation. Every view in your application - should be a child of the element you specify here. - **/ + This is the element that will be passed to the Application's, eventDispatcher, + which sets up the listeners for event delegation. Every view in your application + should be a child of the element you specify here. + **/ rootElement: HTMLElement; /** - Called when the Application has become ready. - The call will be delayed until the DOM has become ready. - **/ + Called when the Application has become ready. + The call will be delayed until the DOM has become ready. + **/ ready: Function; /** - Application's router. - **/ + Application's router. + **/ Router: Router; } /** - This module implements Observer-friendly Array-like behavior. This mixin is picked up by the - Array class as well as other controllers, etc. that want to appear to be arrays. - **/ + This module implements Observer-friendly Array-like behavior. This mixin is picked up by the + Array class as well as other controllers, etc. that want to appear to be arrays. + **/ class Array implements Enumerable { addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): any[]; addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable; @@ -365,14 +365,14 @@ declare module Ember { someProperty(key: string, value?: string): boolean; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): Enumerable; enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable; enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable; @@ -387,13 +387,13 @@ declare module Ember { forEach(callback: Function, target?: any): any; getEach(key: string): any[]; indexOf(object: any, startAt: number): number; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; lastIndexOf(object: any, startAt: number): number; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; objectAt(idx: number): any; - objectsAt(...number): any[]; + objectsAt(...args: number[]): any[]; reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any; reject: ItemIndexEnumerableCallbackTarget; rejectBy(key: string, value?: string): any[]; @@ -405,30 +405,30 @@ declare module Ember { toArray(): any[]; uniq(): Enumerable; without(value: any): Enumerable; - '@each': EachProxy; + '@each': EachProxy; Boolean: boolean; - '[]': any[]; + '[]': any[]; firstObject: any; hasEnumerableObservers: boolean; lastObject: any; length: number; } /** - Provides a way for you to publish a collection of objects so that you can easily bind to the - collection from a Handlebars #each helper, an Ember.CollectionView, or other controllers. - **/ + Provides a way for you to publish a collection of objects so that you can easily bind to the + collection from a Handlebars #each helper, an Ember.CollectionView, or other controllers. + **/ class ArrayController extends ArrayProxy implements SortableMixin, ControllerMixin { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -438,37 +438,37 @@ declare module Ember { sortAscending: boolean; sortFunction: Comparable; sortProperties: any[]; - replaceRoute(name: string, ...any); - transitionToRoute(name: string, ...any); + replaceRoute(name: string, ...args: any[]): void; + transitionToRoute(name: string, ...args: any[]): void; controllers: {}; needs: string[]; target: any; } /** - Array polyfills to support ES5 features in older browsers. - **/ + Array polyfills to support ES5 features in older browsers. + **/ var ArrayPolyfills: { map: typeof Array.prototype.map; forEach: typeof Array.prototype.forEach; indexOf: typeof Array.prototype.indexOf; }; /** - An ArrayProxy wraps any other object that implements Ember.Array and/or Ember.MutableArray, - forwarding all requests. This makes it very useful for a number of binding use cases or other cases - where being able to swap out the underlying array is useful. - **/ + An ArrayProxy wraps any other object that implements Ember.Array and/or Ember.MutableArray, + forwarding all requests. This makes it very useful for a number of binding use cases or other cases + where being able to swap out the underlying array is useful. + **/ class ArrayProxy extends Object implements MutableArray { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -482,14 +482,14 @@ declare module Ember { clear(): any[]; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): any[]; enumerableContentWillChange(removing: Enumerable, adding: number): any[]; enumerableContentWillChange(removing: number, adding: Enumerable): any[]; @@ -505,24 +505,24 @@ declare module Ember { getEach(key: string): any[]; indexOf(object: any, startAt: number): number; insertAt(idx: number, object: any): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; lastIndexOf(object: any, startAt: number): number; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; objectAt(idx: number): any; objectAtContent(idx: number): any; - objectsAt(...number): any[]; + objectsAt(...args: number[]): any[]; popObject(): any; pushObject(obj: any): any; - pushObjects(...any): any[]; + pushObjects(...args: any[]): any[]; reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any; reject: ItemIndexEnumerableCallbackTarget; rejectBy(key: string, value?: string): any[]; removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): any[]; removeAt(start: number, len: number): any; removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[]; - replace(idx: number, amt: number, objects: any[]); + replace(idx: number, amt: number, objects: any[]): any; replaceContent(idx: number, amt: number, objects: any[]): void; reverseObjects(): any[]; setEach(key: string, value?: any): any; @@ -535,8 +535,8 @@ declare module Ember { unshiftObject(object: any): any; unshiftObjects(objects: any[]): any[]; without(value: any): any[]; - '[]': any[]; - '@each': EachProxy; + '[]': any[]; + '@each': EachProxy; Boolean: boolean; firstObject: any; hasEnumerableObservers: boolean; @@ -549,9 +549,9 @@ declare module Ember { } var BOOTED: boolean; /** - Connects the properties of two objects so that whenever the value of one property changes, - the other property will be changed also. - **/ + Connects the properties of two objects so that whenever the value of one property changes, + the other property will be changed also. + **/ class Binding { constructor(toPath: string, fromPath: string); connect(obj: any): Binding; @@ -567,45 +567,45 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; triggerAction(opts: {}): boolean; } /** - The internal class used to create text inputs when the {{input}} helper is used - with type of checkbox. See Handlebars.helpers.input for usage details. - **/ + The internal class used to create text inputs when the {{input}} helper is used + with type of checkbox. See Handlebars.helpers.input for usage details. + **/ class Checkbox extends View { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; } /** - An Ember.View descendent responsible for managing a collection (an array or array-like object) - by maintaining a child view object and associated DOM representation for each item in the array - and ensuring that child views and their associated rendered HTML are updated when items in the - array are added, removed, or replaced. - **/ + An Ember.View descendent responsible for managing a collection (an array or array-like object) + by maintaining a child view object and associated DOM representation for each item in the array + and ensuring that child views and their associated rendered HTML are updated when items in the + array are added, removed, or replaced. + **/ class CollectionView extends ContainerView { arrayDidChange(content: any[], start: number, removed: number, added: number): void; arrayWillChange(content: any[], start: number, removed: number): void; @@ -618,29 +618,29 @@ declare module Ember { itemViewClass: View; } /** - Implements some standard methods for comparing objects. Add this mixin to any class - you create that can compare its instances. - **/ + Implements some standard methods for comparing objects. Add this mixin to any class + you create that can compare its instances. + **/ class Comparable { compare(a: any, b: any): number; } /** - A view that is completely isolated. Property access in its templates go to the view object - and actions are targeted at the view object. There is no access to the surrounding context or - outer controller; all contextual information is passed in. - **/ + A view that is completely isolated. Property access in its templates go to the view object + and actions are targeted at the view object. There is no access to the surrounding context or + outer controller; all contextual information is passed in. + **/ class Component extends View { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -648,16 +648,16 @@ declare module Ember { targetObject: Controller; } /** - A computed property transforms an objects function into a property. - By default the function backing the computed property will only be called once and the result - will be cached. You can specify various properties that your computed property is dependent on. - This will force the cached result to be recomputed if the dependencies are modified. - **/ + A computed property transforms an objects function into a property. + By default the function backing the computed property will only be called once and the result + will be cached. You can specify various properties that your computed property is dependent on. + This will force the cached result to be recomputed if the dependencies are modified. + **/ class ComputedProperty { cacheable(aFlag?: boolean): ComputedProperty; get(keyName: string): any; meta(meta: {}): ComputedProperty; - property(...string): ComputedProperty; + property(...args: string[]): ComputedProperty; readOnly(): ComputedProperty; set(keyName: string, newValue: any, oldValue: string): any; // ReSharper disable UsingOfReservedWord @@ -676,11 +676,11 @@ declare module Ember { child(): Container; set(object: {}, key: string, value: any): void; /** - registers a factory for later injection - @param fullName type:name (e.g., 'model:user') - @param factory (e.g., App.Person) - **/ - register(fullName: string, factory: Function, options?: {}): void; + registers a factory for later injection + @param fullName type:name (e.g., 'model:user') + @param factory (e.g., App.Person) + **/ + register(fullName: string, factory: Function, options?: {}): void; unregister(fullName: string): void; resolve(fullName: string): Function; describe(fullName: string): string; @@ -697,42 +697,42 @@ declare module Ember { reset(): void; } /** - An Ember.View subclass that implements Ember.MutableArray allowing programatic - management of its child views. - **/ + An Ember.View subclass that implements Ember.MutableArray allowing programatic + management of its child views. + **/ class ContainerView extends View { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; } class Controller extends Object { } /** - Additional methods for the ControllerMixin. - **/ + Additional methods for the ControllerMixin. + **/ class ControllerMixin { - replaceRoute(name: string, ...any): void; - transitionToRoute(name: string, ...any): void; + replaceRoute(name: string, ...args: any[]): void; + transitionToRoute(name: string, ...args: any[]): void; controllers: {}; needs: string[]; target: any; } /** - Implements some standard methods for copying an object. Add this mixin to any object you - create that can create a copy of itself. This mixin is added automatically to the built-in array. - You should generally implement the copy() method to return a copy of the receiver. - Note that frozenCopy() will only work if you also implement Ember.Freezable. - **/ + Implements some standard methods for copying an object. Add this mixin to any object you + create that can create a copy of itself. This mixin is added automatically to the built-in array. + You should generally implement the copy() method to return a copy of the receiver. + Note that frozenCopy() will only work if you also implement Ember.Freezable. + **/ class Copyable { copy(deep: boolean): Copyable; frozenCopy(): Copyable; @@ -741,64 +741,64 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; /** - Destroys an object by setting the isDestroyed flag and removing its metadata, which effectively - destroys observers and bindings. If you try to set a property on a destroyed object, an exception - will be raised. Note that destruction is scheduled for the end of the run loop and does not - happen immediately. It will set an isDestroying flag immediately. - **/ - destroy(): CoreObject; + Destroys an object by setting the isDestroyed flag and removing its metadata, which effectively + destroys observers and bindings. If you try to set a property on a destroyed object, an exception + will be raised. Note that destruction is scheduled for the end of the run loop and does not + happen immediately. It will set an isDestroying flag immediately. + **/ + destroy(): CoreObject; init(): void; /** - Returns a string representation which attempts to provide more information than Javascript's toString - typically does, in a generic way for all Ember objects (e.g., ""). - **/ - toString(): string; + Returns a string representation which attempts to provide more information than Javascript's toString + typically does, in a generic way for all Ember objects (e.g., ""). + **/ + toString(): string; willDestroy(): void; /** - Defines the properties that will be concatenated from the superclass (instead of overridden). - **/ + Defines the properties that will be concatenated from the superclass (instead of overridden). + **/ concatenatedProperties: any[]; /** - Destroyed object property flag. If this property is true the observers and bindings were - already removed by the effect of calling the destroy() method. - **/ + Destroyed object property flag. If this property is true the observers and bindings were + already removed by the effect of calling the destroy() method. + **/ isDestroyed: boolean; /** - Destruction scheduled flag. The destroy() method has been called. The object stays intact - until the end of the run loop at which point the isDestroyed flag is set. - **/ + Destruction scheduled flag. The destroy() method has been called. The object stays intact + until the end of the run loop at which point the isDestroyed flag is set. + **/ isDestroying: boolean; } /** - An abstract class that exists to give view-like behavior to both Ember's main view class Ember.View - and other classes like Ember._SimpleMetamorphView that don't need the fully functionaltiy of Ember.View. - Unless you have specific needs for CoreView, you will use Ember.View in your applications. - **/ + An abstract class that exists to give view-like behavior to both Ember's main view class Ember.View + and other classes like Ember._SimpleMetamorphView that don't need the fully functionaltiy of Ember.View. + Unless you have specific needs for CoreView, you will use Ember.View in your applications. + **/ class CoreView extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -815,12 +815,12 @@ declare module Ember { } function DEFAULT_GETTER_FUNCTION(name: string): Function; /** - The DefaultResolver defines the default lookup rules to resolve container lookups before consulting - the container for registered items: - templates are looked up on Ember.TEMPLATES - other names are looked up on the application after converting the name. - For example, controller:post looks up App.PostController by default. - **/ + The DefaultResolver defines the default lookup rules to resolve container lookups before consulting + the container for registered items: + templates are looked up on Ember.TEMPLATES + other names are looked up on the application after converting the name. + For example, controller:post looks up App.PostController by default. + **/ class DefaultResolver { resolve(fullName: string): {}; namespace: Application; @@ -836,42 +836,42 @@ declare module Ember { then(resolve: Function, reject: Function): void; } /** - Objects of this type can implement an interface to respond to requests to get and set. - The default implementation handles simple properties. - You generally won't need to create or subclass this directly. - **/ + Objects of this type can implement an interface to respond to requests to get and set. + The default implementation handles simple properties. + You generally won't need to create or subclass this directly. + **/ class Descriptor { } var EMPTY_META: {}; // TODO: define interface var ENV: {}; var EXTEND_PROTOTYPES: boolean; /** - This is the object instance returned when you get the @each property on an array. It uses - the unknownProperty handler to automatically create EachArray instances for property names. - **/ + This is the object instance returned when you get the @each property on an array. It uses + the unknownProperty handler to automatically create EachArray instances for property names. + **/ class EachProxy extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; unknownProperty(keyName: string, value: any): any[]; } /** - This mixin defines the common interface implemented by enumerable objects in Ember. Most of these - methods follow the standard Array iteration API defined up to JavaScript 1.8 (excluding language-specific - features that cannot be emulated in older versions of JavaScript). - This mixin is applied automatically to the Array class on page load, so you can use any of these methods - on simple arrays. If Array already implements one of these methods, the mixin will not override them. - **/ + This mixin defines the common interface implemented by enumerable objects in Ember. Most of these + methods follow the standard Array iteration API defined up to JavaScript 1.8 (excluding language-specific + features that cannot be emulated in older versions of JavaScript). + This mixin is applied automatically to the Array class on page load, so you can use any of these methods + on simple arrays. If Array already implements one of these methods, the mixin will not override them. + **/ class Enumerable { addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable; any(callback: Function, target?: any): boolean; @@ -879,14 +879,14 @@ declare module Ember { someProperty(key: string, value?: string): boolean; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): Enumerable; enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable; enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable; @@ -900,7 +900,7 @@ declare module Ember { findBy(key: string, value?: string): any; forEach(callback: Function, target?: any): any; getEach(key: string): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; @@ -913,48 +913,48 @@ declare module Ember { toArray(): any[]; uniq(): Enumerable; without(value: any): Enumerable; - '[]': any[]; + '[]': any[]; firstObject: any; hasEnumerableObservers: boolean; lastObject: any; } var EnumerableUtils: {}; // TODO: define interface /** - A subclass of the JavaScript Error object for use in Ember. - **/ + A subclass of the JavaScript Error object for use in Ember. + **/ // ReSharper disable once DuplicatingLocalDeclaration var Error: typeof Error; /** - Handles delegating browser events to their corresponding Ember.Views. For example, when you click on - a view, Ember.EventDispatcher ensures that that view's mouseDown method gets called. - **/ + Handles delegating browser events to their corresponding Ember.Views. For example, when you click on + a view, Ember.EventDispatcher ensures that that view's mouseDown method gets called. + **/ class EventDispatcher extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; events: {}; } /** - This mixin allows for Ember objects to subscribe to and emit events. - You can also chain multiple event subscriptions. - **/ + This mixin allows for Ember objects to subscribe to and emit events. + You can also chain multiple event subscriptions. + **/ class Evented { has(name: string): boolean; off(name: string, target: any, method: Function): Evented; on(name: string, target: any, method: Function): Evented; one(name: string, target: any, method: Function): Evented; - trigger(name: string, ...string): void; + trigger(name: string, ...args: string[]): void; } var FROZEN_ERROR: string; class Freezable { @@ -996,32 +996,32 @@ declare module Ember { class Compiler { } class JavaScriptCompiler { } function registerHelper(name: string, fn: Function, inverse?: boolean): void; - function registerPartial(name: string, str): void; - function K(); - function createFrame(object); + function registerPartial(name: string, str: any): void; + function K(): any; + function createFrame(objec: any): any; function Exception(message: string): void; class SafeString { constructor(str: string); static toString(): string; } - function parse(string: string); - function print(ast); - var logger; - function log(level, str): void; - function compile(environment, options?, context?, asObject?); + function parse(string: string): any; + function print(ast: any): void; + var logger: typeof Ember.Logger; + function log(level: string, str: string): void; + function compile(environment: any, options?: any, context?: any, asObject?: any): any; } class HashLocation extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1030,14 +1030,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1046,7 +1046,7 @@ declare module Ember { var IS_BINDING: RegExp; class Instrumentation { getProperties(obj: any, list: any[]): {}; - getProperties(obj: any, ...string): {}; + getProperties(obj: any, ...args: string[]): {}; instrument(name: string, payload: any, callback: Function, binding: any): void; reset(): void; subscribe(pattern: string, object: any): void; @@ -1060,14 +1060,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1094,11 +1094,11 @@ declare module Ember { } var Logger: { assert(param: any): void; - debug(...any): void; - error(...any): void; - info(...any): void; - log(...any): void; - warn(...any): void; + debug(...args: any[]): void; + error(...args: any[]): void; + info(...args: any[]): void; + log(...args: any[]): void; + warn(...args: any[]): void; }; function MANDATORY_SETTER_FUNCTION(value: string): void; var META_KEY: string; @@ -1119,9 +1119,9 @@ declare module Ember { class Mixin { apply(obj: any): any; /** - Creates an instance of the class. - @param arguments A hash containing values with which to initialize the newly instantiated object. - **/ + Creates an instance of the class. + @param arguments A hash containing values with which to initialize the newly instantiated object. + **/ static create(arguments?: {}): T; detect(obj: any): boolean; reopen(arguments?: {}): T; @@ -1137,14 +1137,14 @@ declare module Ember { clear(): any[]; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): Enumerable; enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable; enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable; @@ -1160,23 +1160,23 @@ declare module Ember { getEach(key: string): any[]; indexOf(object: any, startAt: number): number; insertAt(idx: number, object: any): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; lastIndexOf(object: any, startAt: number): number; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; objectAt(idx: number): any; - objectsAt(...number): any[]; + objectsAt(...args: number[]): any[]; popObject(): any; pushObject(obj: any): any; - pushObjects(...any): any[]; + pushObjects(...args: any[]): any[]; reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any; reject: ItemIndexEnumerableCallbackTarget; rejectBy(key: string, value?: string): any[]; removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): any[]; removeAt(start: number, len: number): any; removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Enumerable; - replace(idx: number, amt: number, objects: any[]); + replace(idx: number, amt: number, objects: any[]): any; reverseObjects(): any[]; setEach(key: string, value?: any): any; setObjects(objects: any[]): any[]; @@ -1188,8 +1188,8 @@ declare module Ember { unshiftObject(object: any): any; unshiftObjects(objects: any[]): any[]; without(value: any): Enumerable; - '[]': any[]; - '@each': EachProxy; + '[]': any[]; + '@each': EachProxy; Boolean: boolean; firstObject: any; hasEnumerableObservers: boolean; @@ -1209,14 +1209,14 @@ declare module Ember { someProperty(key: string, value?: string): boolean; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): Enumerable; enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable; enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable; @@ -1230,7 +1230,7 @@ declare module Ember { findBy(key: string, value?: string): any; forEach(callback: Function, target?: any): any; getEach(key: string): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; @@ -1245,7 +1245,7 @@ declare module Ember { toArray(): any[]; uniq(): Enumerable; without(value: any): Enumerable; - '[]': any[]; + '[]': any[]; firstObject: any; hasEnumerableObservers: boolean; lastObject: any; @@ -1255,14 +1255,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1280,14 +1280,14 @@ declare module Ember { clear(): any[]; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): any[]; enumerableContentWillChange(removing: Enumerable, adding: number): any[]; enumerableContentWillChange(removing: number, adding: Enumerable): any[]; @@ -1303,23 +1303,23 @@ declare module Ember { getEach(key: string): any[]; indexOf(object: any, startAt: number): number; insertAt(idx: number, object: any): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; lastIndexOf(object: any, startAt: number): number; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; objectAt(idx: number): any; - objectsAt(...number): any[]; + objectsAt(...args: number[]): any[]; popObject(): any; pushObject(obj: any): any; - pushObjects(...any): any[]; + pushObjects(...args: any[]): any[]; reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any; reject: ItemIndexEnumerableCallbackTarget; rejectBy(key: string, value?: string): any[]; removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): any[]; removeAt(start: number, len: number): any; removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[]; - replace(idx: number, amt: number, objects: any[]); + replace(idx: number, amt: number, objects: any[]): any; reverseObjects(): any[]; setEach(key: string, value?: any): any; setObjects(objects: any[]): any[]; @@ -1331,8 +1331,8 @@ declare module Ember { unshiftObject(object: any): any; unshiftObjects(objects: any[]): any[]; without(value: any): any[]; - '[]': any[]; - '@each': EachProxy; + '[]': any[]; + '@each': EachProxy; Boolean: boolean; firstObject: any; hasEnumerableObservers: boolean; @@ -1348,7 +1348,7 @@ declare module Ember { decrementProperty(keyName: string, decrement?: number): number; endPropertyChanges(): any[]; get(keyName: string): any; - getProperties(...string): {}; + getProperties(...args: string[]): {}; getProperties(keys: string[]): {}; getWithDefault(keyName: string, defaultValue: any): any; hasObserverFor(key: string): boolean; @@ -1368,14 +1368,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1383,40 +1383,40 @@ declare module Ember { var ORDER_DEFINITION: string[]; class Object extends CoreObject implements Observable { /** - Creates a subclass of the Object class. - **/ + Creates a subclass of the Object class. + **/ static extend(arguments?: CoreObjectArguments): T; /** - Creates an instance of the class. - @param arguments A hash containing values with which to initialize the newly instantiated object. - **/ + Creates an instance of the class. + @param arguments A hash containing values with which to initialize the newly instantiated object. + **/ static create(arguments?: {}): T; /** - Equivalent to doing extend(arguments).create(). If possible use the normal create method instead. - **/ + Equivalent to doing extend(arguments).create(). If possible use the normal create method instead. + **/ static createWithMixins(arguments?: {}): T; static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; /** - Augments a constructor's prototype with additional properties and functions. - To add functions and properties to the constructor itself, see reopenClass. - **/ + Augments a constructor's prototype with additional properties and functions. + To add functions and properties to the constructor itself, see reopenClass. + **/ static reopen(arguments?: {}): T; /** - Augments a constructor's own properties and functions. - To add functions and properties to instances of a constructor by extending the - constructor's prototype see reopen. - **/ + Augments a constructor's own properties and functions. + To add functions and properties to instances of a constructor by extending the + constructor's prototype see reopen. + **/ static reopenClass(arguments?: {}): T; static isClass: boolean; static isMethod: boolean; @@ -1426,7 +1426,7 @@ declare module Ember { decrementProperty(keyName: string, decrement?: number): number; endPropertyChanges(): Observable; get(keyName: string): any; - getProperties(...string): {}; + getProperties(...args: string[]): {}; getProperties(keys: string[]): {}; getWithDefault(keyName: string, defaultValue: any): any; hasObserverFor(key: string): boolean; @@ -1441,8 +1441,8 @@ declare module Ember { toggleProperty(keyName: string): any; } class ObjectController extends ObjectProxy implements ControllerMixin { - replaceRoute(name: string, ...any): void; - transitionToRoute(name: string, ...any): void; + replaceRoute(name: string, ...args: any[]): void; + transitionToRoute(name: string, ...args: any[]): void; controllers: Object; needs: string[]; target: any; @@ -1451,20 +1451,20 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; /** - The object whose properties will be forwarded. - **/ + The object whose properties will be forwarded. + **/ content: Object; } class Observable { @@ -1474,7 +1474,7 @@ declare module Ember { decrementProperty(keyName: string, decrement?: number): number; endPropertyChanges(): Observable; get(keyName: string): any; - getProperties(...string): {}; + getProperties(...args: string[]): {}; getProperties(keys: string[]): {}; getWithDefault(keyName: string, defaultValue: any): any; hasObserverFor(key: string): boolean; @@ -1528,14 +1528,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1551,26 +1551,26 @@ declare module Ember { render(name: string, options?: RenderOptions): void; renderTemplate(controller: Controller, model: {}): void; // ReSharper disable once InconsistentNaming - replaceWith(name: string, ...Object): void; - send(name: string, ...any): void; + replaceWith(name: string, ...object: any[]): void; + send(name: string, ...args: any[]): void; serialize(model: {}, params: string[]): string; setupController(controller: Controller, model: {}): void; // ReSharper disable once InconsistentNaming - transitionTo(name: string, ...Object): void; + transitionTo(name: string, ...object: any[]): void; actions: ActionsHash; } class Router extends Object { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1587,14 +1587,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1613,14 +1613,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1634,14 +1634,14 @@ declare module Ember { someProperty(key: string, value?: string): boolean; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): Set; enumerableContentWillChange(removing: Enumerable, adding: number): Set; enumerableContentWillChange(removing: number, adding: Enumerable): Set; @@ -1655,7 +1655,7 @@ declare module Ember { findBy(key: string, value?: string): any; forEach(callback: Function, target?: any): any; getEach(key: string): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; @@ -1670,7 +1670,7 @@ declare module Ember { toArray(): any[]; uniq(): Set; without(value: any): Set; - '[]': any[]; + '[]': any[]; firstObject: any; hasEnumerableObservers: boolean; lastObject: any; @@ -1679,13 +1679,13 @@ declare module Ember { freeze(): Set; isFrozen: boolean; add(obj: any): Set; - addEach(...any): Set; + addEach(...args: any[]): Set; clear(): Set; isEqual(obj: Set): boolean; pop(): any; push(obj: any): Set; remove(obj: any): Set; - removeEach(...any): Set; + removeEach(...args: any[]): Set; shift(): any; unshift(obj: any): Set; length: number; @@ -1699,14 +1699,14 @@ declare module Ember { someProperty(key: string, value?: string): boolean; compact(): any[]; contains(obj: any): boolean; - enumerableContentDidChange(start: number, removing: number, adding: number); - enumerableContentDidChange(start: number, removing: Enumerable, adding: number); - enumerableContentDidChange(start: number, removing: number, adding: Enumerable); - enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable); - enumerableContentDidChange(removing: number, adding: number); - enumerableContentDidChange(removing: Enumerable, adding: number); - enumerableContentDidChange(removing: number, adding: Enumerable); - enumerableContentDidChange(removing: Enumerable, adding: Enumerable); + enumerableContentDidChange(start: number, removing: number, adding: number): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any; + enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any; + enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any; + enumerableContentDidChange(removing: number, adding: number): any; + enumerableContentDidChange(removing: Enumerable, adding: number): any; + enumerableContentDidChange(removing: number, adding: Enumerable): any; + enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any; enumerableContentWillChange(removing: number, adding: number): Enumerable; enumerableContentWillChange(removing: Enumerable, adding: number): Enumerable; enumerableContentWillChange(removing: number, adding: Enumerable): Enumerable; @@ -1720,7 +1720,7 @@ declare module Ember { findBy(key: string, value?: string): any; forEach(callback: Function, target?: any): any; getEach(key: string): any[]; - invoke(methodName: string, ...any): any[]; + invoke(methodName: string, ...args: any[]): any[]; map: ItemIndexEnumerableCallbackTarget; mapBy(key: string): any[]; nextObject(index: number, previousObject: any, context: any): any; @@ -1735,7 +1735,7 @@ declare module Ember { toArray(): any[]; uniq(): Enumerable; without(value: any): Enumerable; - '[]': any[]; + '[]': any[]; arrangedContent: any; firstObject: any; hasEnumerableObservers: boolean; @@ -1748,14 +1748,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1763,7 +1763,7 @@ declare module Ember { off(name: string, target: any, method: Function): State; on(name: string, target: any, method: Function): State; one(name: string, target: any, method: Function): State; - trigger(name: string, ...string): void; + trigger(name: string, ...args: string[]): void; getPathsCache(stateManager: {}, path: string): {}; init(): void; setPathsCache(stateManager: {}, path: string, transitions: any): void; @@ -1781,14 +1781,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1804,7 +1804,7 @@ declare module Ember { stateMetaFor(state: State): {}; transitionTo(path: string, context: any): void; triggerSetupContext(transitions: TransitionsHash): void; - unhandledEvent(manager: StateManager, event: string); + unhandledEvent(manager: StateManager, event: string): any; currentPath: string; currentState: State; errorOnUnhandledEvents: boolean; @@ -1816,9 +1816,9 @@ declare module Ember { function classify(str: string): string; function dasherize(str: string): string; function decamelize(str: string): string; - function fmt(...string): string; + function fmt(...args: string[]): string; function htmlSafe(str: string): void; // TODO: @returns Handlebars.SafeStringStatic; - function loc(...string): string; + function loc(...args: string[]): string; function underscore(str: string): string; function w(str: string): string[]; } @@ -1848,14 +1848,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1872,14 +1872,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1911,14 +1911,14 @@ declare module Ember { static detect(obj: any): boolean; static detectInstance(obj: any): boolean; /** - Iterate over each computed property for the class, passing its name and any - associated metadata (see metaForProperty) to the callback. - **/ + Iterate over each computed property for the class, passing its name and any + associated metadata (see metaForProperty) to the callback. + **/ static eachComputedProperty(callback: Function, binding: {}): void; /** - Returns the original hash that was passed to meta(). - @param key property name - **/ + Returns the original hash that was passed to meta(). + @param key property name + **/ static metaForProperty(key: string): {}; static isClass: boolean; static isMethod: boolean; @@ -1983,8 +1983,8 @@ declare module Ember { function addListener(obj: any, eventName: string, func: Function, method: string, once?: boolean): void; var addObserver: ModifyObserver; /** - Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead. - **/ + Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead. + **/ var alias: typeof deprecateFunc; function aliasMethod(methodName: string): Descriptor; var anyUnprocessedMixins: boolean; @@ -2001,8 +2001,8 @@ declare module Ember { var computed: { (callback: Function): ComputedProperty; alias(dependentKey: string): ComputedProperty; - and(...string): ComputedProperty; - any(...string): ComputedProperty; + and(...args: string[]): ComputedProperty; + any(...args: string[]): ComputedProperty; bool(dependentKey: string): ComputedProperty; defaultTo(defaultPath: string): ComputedProperty; empty(dependentKey: string): ComputedProperty; @@ -2011,13 +2011,13 @@ declare module Ember { gte(dependentKey: string, value: number): ComputedProperty; lt(dependentKey: string, value: number): ComputedProperty; lte(dependentKey: string, value: number): ComputedProperty; - map(...string): ComputedProperty; + map(...args: string[]): ComputedProperty; match(dependentKey: string, regexp: RegExp): ComputedProperty; none(dependentKey: string): ComputedProperty; not(dependentKey: string): ComputedProperty; notEmpty(dependentKey: string): ComputedProperty; oneWay(dependentKey: string): ComputedProperty; - or(...string): ComputedProperty; + or(...args: string[]): ComputedProperty; }; // ReSharper disable DuplicatingLocalDeclaration var config: {}; @@ -2025,9 +2025,9 @@ declare module Ember { function controllerFor(container: Container, controllerName: string, lookupOptions?: {}): Controller; function copy(obj: any, deep: boolean): any; /** - Creates an instance of the CoreObject class. - @param arguments A hash containing values with which to initialize the newly instantiated object. - **/ + Creates an instance of the CoreObject class. + @param arguments A hash containing values with which to initialize the newly instantiated object. + **/ function create(arguments?: {}): CoreObject; function debug(message: string): void; function defineProperty(obj: any, keyName: string, desc: {}): void; @@ -2035,8 +2035,8 @@ declare module Ember { function deprecateFunc(message: string, func: Function): Function; function destroy(obj: any): void; /** - Ember.empty is deprecated. Please use Ember.isEmpty instead. - **/ + Ember.empty is deprecated. Please use Ember.isEmpty instead. + **/ // ReSharper disable once DuplicatingLocalDeclaration var empty: typeof deprecateFunc; function endPropertyChanges(): void; @@ -2049,15 +2049,15 @@ declare module Ember { function get(obj: any, keyName: string): any; function getMeta(obj: any, property: string): any; /** - getPath is deprecated since get now supports paths. - **/ + getPath is deprecated since get now supports paths. + **/ var getPath: typeof deprecateFunc; function getWithDefault(root: string, key: string, defaultValue: any): any; function guidFor(obj: any): string; function handleErrors(func: Function, context: any): any; function hasListeners(context: any, name: string): boolean; function hasOwnProperty(prop: string): boolean; - function immediateObserver(func: Function, ...propertyNames): Function; + function immediateObserver(func: Function, ...propertyNames: any[]): Function; var imports: {}; function inspect(obj: any): string; function instrument(name: string, payload: any, callback: Function, binding: any): void; @@ -2079,13 +2079,13 @@ declare module Ember { function merge(original: any, updates: any): any; function meta(obj: any, writable?: boolean): {}; function metaPath(obj: any, path: string, writable?: boolean): any; - function mixin(obj: any, ...any): any; + function mixin(obj: any, ...args: any[]): any; /** - Ember.none is deprecated. Please use Ember.isNone instead. - **/ + Ember.none is deprecated. Please use Ember.isNone instead. + **/ var none: typeof deprecateFunc; function normalizeTuple(target: any, path: string): any[]; - function observer(func: Function, ...string): Function; + function observer(func: Function, ...args: string[]): Function; function observersFor(obj: any, path: string): any[]; function onLoad(name: string, callback: Function): void; function oneWay(obj: any, to: string, from: string): Binding; @@ -2119,18 +2119,18 @@ declare module Ember { debounce(target: any, method: Function, ...args: any[]): void; debounce(target: any, method: string, ...args: any[]): void; end(): void; - join(target: any, method: Function, ...any): any; - join(target: any, method: string, ...any): any; + join(target: any, method: Function, ...args: any[]): any; + join(target: any, method: string, ...args: any[]): any; later(target: any, method: Function, ...args: any[]): string; later(target: any, method: string, ...args: any[]): string; - next(target: any, method: Function, ...any): number; - next(target: any, method: string, ...any): number; - once(target: any, method: Function, ...any): number; - once(target: any, method: string, ...any): number; - schedule(queue: string, target: any, method: Function, ...any): void; - schedule(queue: string, target: any, method: string, ...any): void; - scheduleOnce(queue: string, target: any, method: Function, ...any): void; - scheduleOnce(queue: string, target: any, method: string, ...any): void; + next(target: any, method: Function, ...args: any[]): number; + next(target: any, method: string, ...args: any[]): number; + once(target: any, method: Function, ...args: any[]): number; + once(target: any, method: string, ...args: any[]): number; + schedule(queue: string, target: any, method: Function, ...args: any[]): void; + schedule(queue: string, target: any, method: string, ...args: any[]): void; + scheduleOnce(queue: string, target: any, method: Function, ...args: any[]): void; + scheduleOnce(queue: string, target: any, method: string, ...args: any[]): void; sync(): void; throttle(target: any, method: Function, ...args: any[]): void; throttle(target: any, method: string, ...args: any[]): void; @@ -2141,8 +2141,8 @@ declare module Ember { function set(obj: any, keyName: string, value: any): any; function setMeta(obj: any, property: string, value: any): void; /** - setPath is deprecated since set now supports paths. - **/ + setPath is deprecated since set now supports paths. + **/ var setPath: typeof deprecateFunc; function setProperties(self: any, hash: {}): any; function subscribe(pattern: string, object: any): void; @@ -2153,8 +2153,8 @@ declare module Ember { function tryInvoke(obj: any, methodName: string, args?: any[]): any; function trySet(obj: any, path: string, value: any): void; /** - trySetPath has been renamed to trySet. - **/ + trySetPath has been renamed to trySet. + **/ var trySetPath: typeof deprecateFunc; function typeOf(item: any): string; function unwatch(obj: any, keyPath: string): void; @@ -2174,8 +2174,8 @@ declare module Ember { // ReSharper disable DuplicatingLocalDeclaration declare module Em { /** - Alias for jQuery. - **/ + Alias for jQuery. + **/ var $: typeof Ember.$; var A: typeof Ember.A; class Application extends Ember.Application { }