typescript-closure-tools
Version:
Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files
1,102 lines (1,101 loc) • 1.99 MB
TypeScript
// Type definitions for Touch 2.3.1
// Project: http://www.sencha.com/products/touch/
// Definitions by: Brian Kotek <https://github.com/brian428/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Ext {
export interface IAbstractComponent extends Ext.IEvented {
}
}
declare module Ext {
export interface IAbstractManager extends Ext.IBase {
/** [Property] (Ext.util.HashMap) */
all?: Ext.util.IHashMap;
/** [Method] Creates and returns an instance of whatever this manager manages based on the supplied type and config object
* @param config Object The config object.
* @param defaultType String If no type is discovered in the config object, we fall back to this type.
* @returns Object The instance of whatever this manager is managing.
*/
create?( config?:any, defaultType?:string ): any;
/** [Method] Executes the specified function once for each item in the collection
* @param fn Function The function to execute.
* @param scope Object The scope to execute in.
*/
each?( fn?:any, scope?:any ): void;
/** [Method] Returns an item by id
* @param id String The id of the item.
* @returns Object The item, undefined if not found.
*/
get?( id?:string ): any;
/** [Method] Gets the number of items in the collection
* @returns Number The number of items in the collection.
*/
getCount?(): number;
/** [Method] Checks if an item type is registered
* @param type String The mnemonic string by which the class may be looked up.
* @returns Boolean Whether the type is registered.
*/
isRegistered?( type?:string ): boolean;
/** [Method] Registers a function that will be called when an item with the specified id is added to the manager
* @param id String The item id.
* @param fn Function The callback function. Called with a single parameter, the item.
* @param scope Object The scope (this reference) in which the callback is executed. Defaults to the item.
*/
onAvailable?( id?:string, fn?:any, scope?:any ): void;
/** [Method] Registers an item to be managed
* @param item Object The item to register.
*/
register?( item?:any ): void;
/** [Method] Registers a new item constructor keyed by a type key
* @param type String The mnemonic string by which the class may be looked up.
* @param cls Function The new instance class.
*/
registerType?( type?:string, cls?:any ): void;
/** [Method] Unregisters an item by removing it from this manager
* @param item Object The item to unregister.
*/
unregister?( item?:any ): void;
}
}
declare module Ext {
export interface IAbstractPlugin extends Ext.IBase {
}
}
declare module Ext {
export interface IActionSheet extends Ext.ISheet {
/** [Config Option] (String) */
baseCls?: string;
/** [Config Option] (Number/String) */
bottom?: any;
/** [Config Option] (String) */
defaultType?: string;
/** [Config Option] (Number/String) */
height?: any;
/** [Config Option] (Number/String) */
left?: any;
/** [Config Option] (Number/String) */
right?: any;
/** [Method] Returns the value of baseCls
* @returns String
*/
getBaseCls?(): string;
/** [Method] Returns the value of bottom
* @returns Number
*/
getBottom?(): number;
/** [Method] Returns the value of defaultType
* @returns String
*/
getDefaultType?(): string;
/** [Method] Returns the value of height
* @returns String
*/
getHeight?(): string;
/** [Method] Returns the value of left
* @returns Number
*/
getLeft?(): number;
/** [Method] Returns the value of right
* @returns Number
*/
getRight?(): number;
/** [Method] Sets the value of baseCls
* @param baseCls String The new value.
*/
setBaseCls?( baseCls?:string ): void;
/** [Method] Sets the value of bottom
* @param bottom Number The new value.
*/
setBottom?( bottom?:number ): void;
/** [Method] Sets the value of defaultType
* @param defaultType String The new value.
*/
setDefaultType?( defaultType?:string ): void;
/** [Method] Sets the value of height
* @param height String The new value.
*/
setHeight?( height?:string ): void;
/** [Method] Sets the value of left
* @param left Number The new value.
*/
setLeft?( left?:number ): void;
/** [Method] Sets the value of right
* @param right Number The new value.
*/
setRight?( right?:number ): void;
}
}
declare module Ext {
export interface IAjax extends Ext.data.IConnection {
}
export class Ajax {
/** [Property] (Boolean) */
static autoAbort: boolean;
/** [Property] (Ext.Class) */
static self: Ext.IClass;
/** [Method] Aborts any outstanding request
* @param request Object Defaults to the last request.
*/
static abort( request?:any ): void;
/** [Method] Aborts all outstanding requests */
static abortAll(): void;
/** [Method] Appends an after event handler
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
static addAfterListener( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Appends a before event handler
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
static addBeforeListener( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Adds the specified events to the list of events which this Observable may fire
* @param eventNames Object/String... Either an object with event names as properties with a value of true or the first event name string if multiple event names are being passed as separate parameters.
*/
static addEvents( eventNames?:any ): void;
/** [Method] Appends an event handler to this object
* @param eventName String/String[]/Object The name of the event to listen for. May also be an object who's property names are event names.
* @param fn Function/String The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.
* @param scope Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.
* @param options Object An object containing handler configuration. This object may contain any of the following properties:
* @param order String The order of when the listener should be added into the listener queue. Possible values are before, current and after.
*/
static addListener( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Adds listeners to any Observable object or Element which are automatically removed when this Component is destroyed
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
* @param options Object If the eventName parameter was an event name, this is the addListener options.
*/
static addManagedListener( object?:any, eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Call the original method that was previously overridden with override This method is deprecated as callParent does
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)
* @returns Object Returns the result of calling the overridden method
*/
static callOverridden( args?:any ): any;
/** [Method] Call the parent method of the current method
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)
* @returns Object Returns the result of calling the parent method
*/
static callParent( args?:any ): any;
/** [Method] This method is used by an override to call the superclass method but bypass any overridden method
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)
* @returns Object Returns the result of calling the superclass method
*/
static callSuper( args?:any ): any;
/** [Method] Removes all listeners for this object */
static clearListeners(): void;
/** [Method] */
static destroy(): void;
/** [Method] Enables events fired by this Observable to bubble up an owner hierarchy by calling this getBubbleTarget if present
* @param events String/String[] The event name to bubble, or an Array of event names.
*/
static enableBubble( events?:any ): void;
/** [Method] Fires the specified event with the passed parameters and execute a function action at the end if there are no liste
* @param eventName String The name of the event to fire.
* @param args Array Arguments to pass to handers.
* @param fn Function Action.
* @param scope Object Scope of fn.
* @returns Object
*/
static fireAction( eventName?:string, args?:any[], fn?:any, scope?:any ): any;
/** [Method] Fires the specified event with the passed parameters minus the event name plus the options object passed to addList
* @param eventName String The name of the event to fire.
* @param args Object... Variable number of parameters are passed to handlers.
* @returns Boolean Returns false if any of the handlers return false.
*/
static fireEvent( eventName:string, ...args:any[] ): boolean;
/** [Method] Returns the value of async
* @returns Boolean
*/
static getAsync(): boolean;
/** [Method] Returns the value of autoAbort
* @returns Boolean
*/
static getAutoAbort(): boolean;
/** [Method] Returns the value of bubbleEvents
* @returns String/String[]
*/
static getBubbleEvents(): any;
/** [Method] Returns the value of defaultHeaders
* @returns Object
*/
static getDefaultHeaders(): any;
/** [Method] Returns the value of defaultPostHeader
* @returns String
*/
static getDefaultPostHeader(): string;
/** [Method] Returns the value of defaultXhrHeader
* @returns String
*/
static getDefaultXhrHeader(): string;
/** [Method] Returns the value of disableCaching
* @returns Boolean
*/
static getDisableCaching(): boolean;
/** [Method] Returns the value of disableCachingParam
* @returns String
*/
static getDisableCachingParam(): string;
/** [Method] Returns the value of extraParams
* @returns Object
*/
static getExtraParams(): any;
/** [Method] Retrieves the id of this component
* @returns String id
*/
static getId(): string;
/** [Method] Returns the initial configuration passed to constructor
* @param name String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.
* @returns Object/Mixed
*/
static getInitialConfig( name?:string ): any;
/** [Method] Returns the value of listeners
* @returns Object
*/
static getListeners(): any;
/** [Method] Returns the value of method
* @returns String
*/
static getMethod(): string;
/** [Method] Returns the value of password
* @returns String
*/
static getPassword(): string;
/** [Method] Returns the value of timeout
* @returns Number
*/
static getTimeout(): number;
/** [Method] Returns the value of url
* @returns String
*/
static getUrl(): string;
/** [Method] Returns the value of useDefaultHeader
* @returns Boolean
*/
static getUseDefaultHeader(): boolean;
/** [Method] Returns the value of useDefaultXhrHeader
* @returns Boolean
*/
static getUseDefaultXhrHeader(): boolean;
/** [Method] Returns the value of username
* @returns String
*/
static getUsername(): string;
/** [Method] Checks to see if this object has any listeners for a specified event
* @param eventName String The name of the event to check for
* @returns Boolean True if the event is being listened for, else false
*/
static hasListener( eventName?:string ): boolean;
/** [Method] Initialize configuration for this class
* @param instanceConfig Object
* @returns Object mixins The mixin prototypes as key - value pairs
*/
static initConfig( instanceConfig?:any ): any;
/** [Method] Determines whether this object has a request outstanding
* @param request Object The request to check.
* @returns Boolean True if there is an outstanding request.
*/
static isLoading( request?:any ): boolean;
/** [Method] Alias for addManagedListener
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
* @param options Object If the eventName parameter was an event name, this is the addListener options.
*/
static mon( object?:any, eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Alias for removeManagedListener
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
*/
static mun( object?:any, eventName?:any, fn?:any, scope?:any ): void;
/** [Method] Alias for addListener
* @param eventName String/String[]/Object The name of the event to listen for. May also be an object who's property names are event names.
* @param fn Function/String The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.
* @param scope Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.
* @param options Object An object containing handler configuration. This object may contain any of the following properties:
* @param order String The order of when the listener should be added into the listener queue. Possible values are before, current and after.
*/
static on( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Alias for addAfterListener
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
static onAfter( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Alias for addBeforeListener
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
static onBefore( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Checks if the response status was successful
* @param status Number The status code.
* @param xhr XMLHttpRequest
* @returns Object An object containing success/status state.
*/
static parseStatus( status?:number, xhr?:XMLHttpRequest ): any;
/** [Method] Relays selected events from the specified Observable as if the events were fired by this
* @param object Object The Observable whose events this object is to relay.
* @param events String/Array/Object Array of event names to relay.
* @returns Ext.mixin.Observable this
*/
static relayEvents( object?:any, events?:any ): Ext.mixin.IObservable;
/** [Method] Removes a before event handler
* @param eventName String/String[]/Object The name of the event the handler was associated with.
* @param fn Function/String The handler to remove.
* @param scope Object The scope originally specified for fn.
* @param options Object Extra options object.
*/
static removeAfterListener( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Removes a before event handler
* @param eventName String/String[]/Object The name of the event the handler was associated with.
* @param fn Function/String The handler to remove.
* @param scope Object The scope originally specified for fn.
* @param options Object Extra options object.
*/
static removeBeforeListener( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Removes an event handler
* @param eventName String/String[]/Object The type of event the handler was associated with.
* @param fn Function/String The handler to remove. This must be a reference to the function passed into the addListener call.
* @param scope Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.
* @param options Object Extra options object. See addListener for details.
* @param order String The order of the listener to remove. Possible values are before, current and after.
*/
static removeListener( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Adds listeners to any Observable object or Element which are automatically removed when this Component is destroyed
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
*/
static removeManagedListener( object?:any, eventName?:any, fn?:any, scope?:any ): void;
/** [Method] Sends an HTTP request to a remote server
* @param options Object An object which may contain the following properties: (The options object may also contain any other property which might be needed to perform post-processing in a callback because it is passed to callback functions.)
* @returns Object/null The request object. This may be used to cancel the request.
*/
static request( options?:any ): any;
/** [Method] Resumes firing events see suspendEvents
* @param discardQueuedEvents Boolean Pass as true to discard any queued events.
*/
static resumeEvents( discardQueuedEvents?:boolean ): void;
/** [Method] Sets the value of async
* @param async Boolean The new value.
*/
static setAsync( async?:boolean ): void;
/** [Method] Sets the value of autoAbort
* @param autoAbort Boolean The new value.
*/
static setAutoAbort( autoAbort?:boolean ): void;
/** [Method] Sets the value of bubbleEvents
* @param bubbleEvents String/String[] The new value.
*/
static setBubbleEvents( bubbleEvents?:any ): void;
/** [Method] Sets the value of defaultHeaders
* @param defaultHeaders Object The new value.
*/
static setDefaultHeaders( defaultHeaders?:any ): void;
/** [Method] Sets the value of defaultPostHeader
* @param defaultPostHeader String The new value.
*/
static setDefaultPostHeader( defaultPostHeader?:string ): void;
/** [Method] Sets the value of defaultXhrHeader
* @param defaultXhrHeader String The new value.
*/
static setDefaultXhrHeader( defaultXhrHeader?:string ): void;
/** [Method] Sets the value of disableCaching
* @param disableCaching Boolean The new value.
*/
static setDisableCaching( disableCaching?:boolean ): void;
/** [Method] Sets the value of disableCachingParam
* @param disableCachingParam String The new value.
*/
static setDisableCachingParam( disableCachingParam?:string ): void;
/** [Method] Sets the value of extraParams
* @param extraParams Object The new value.
*/
static setExtraParams( extraParams?:any ): void;
/** [Method] Sets the value of listeners
* @param listeners Object The new value.
*/
static setListeners( listeners?:any ): void;
/** [Method] Sets the value of method
* @param method String The new value.
*/
static setMethod( method?:string ): void;
/** [Method] Sets various options such as the url params for the request
* @param options Object The initial options.
* @param scope Object The scope to execute in.
* @returns Object The params for the request.
*/
static setOptions( options?:any, scope?:any ): any;
/** [Method] Sets the value of password
* @param password String The new value.
*/
static setPassword( password?:string ): void;
/** [Method] Sets the value of timeout
* @param timeout Number The new value.
*/
static setTimeout( timeout?:number ): void;
/** [Method] Sets the value of url
* @param url String The new value.
*/
static setUrl( url?:string ): void;
/** [Method] Sets the value of useDefaultHeader
* @param useDefaultHeader Boolean The new value.
*/
static setUseDefaultHeader( useDefaultHeader?:boolean ): void;
/** [Method] Sets the value of useDefaultXhrHeader
* @param useDefaultXhrHeader Boolean The new value.
*/
static setUseDefaultXhrHeader( useDefaultXhrHeader?:boolean ): void;
/** [Method] Sets the value of username
* @param username String The new value.
*/
static setUsername( username?:string ): void;
/** [Method] Get the reference to the class from which this object was instantiated
* @returns Ext.Class
*/
static statics(): Ext.IClass;
/** [Method] Suspends the firing of all events */
static suspendEvents(): void;
/** [Method] Alias for removeListener
* @param eventName String/String[]/Object The type of event the handler was associated with.
* @param fn Function/String The handler to remove. This must be a reference to the function passed into the addListener call.
* @param scope Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.
* @param options Object Extra options object. See addListener for details.
* @param order String The order of the listener to remove. Possible values are before, current and after.
*/
static un( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Alias for removeAfterListener
* @param eventName String/String[]/Object The name of the event the handler was associated with.
* @param fn Function/String The handler to remove.
* @param scope Object The scope originally specified for fn.
* @param options Object Extra options object.
*/
static unAfter( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Alias for removeBeforeListener
* @param eventName String/String[]/Object The name of the event the handler was associated with.
* @param fn Function/String The handler to remove.
* @param scope Object The scope originally specified for fn.
* @param options Object Extra options object.
*/
static unBefore( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Uploads a form using a hidden iframe
* @param form String/HTMLElement/Ext.Element The form to upload.
* @param url String The url to post to.
* @param params String Any extra parameters to pass.
* @param options Object The initial options.
*/
static upload( form?:any, url?:string, params?:string, options?:any ): void;
}
}
declare module Ext {
export interface IAnim extends Ext.IBase {
}
export class Anim {
/** [Config Option] (Function) */
static after: any;
/** [Config Option] (Boolean) */
static autoClear: boolean;
/** [Config Option] (Function) */
static before: any;
/** [Config Option] (Number) */
static delay: number;
/** [Config Option] (String) */
static direction: string;
/** [Config Option] (Boolean) */
static disableAnimations: boolean;
/** [Config Option] (Number) */
static duration: number;
/** [Config Option] (String) */
static easing: string;
/** [Config Option] (Object) */
static from: any;
/** [Config Option] (Boolean) */
static out: boolean;
/** [Config Option] (Boolean) */
static reverse: boolean;
/** [Config Option] (Object) */
static scope: any;
/** [Config Option] (Object) */
static to: any;
/** [Property] (Ext.Class) */
static self: Ext.IClass;
/** [Method] Call the original method that was previously overridden with override This method is deprecated as callParent does
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)
* @returns Object Returns the result of calling the overridden method
*/
static callOverridden( args?:any ): any;
/** [Method] Call the parent method of the current method
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)
* @returns Object Returns the result of calling the parent method
*/
static callParent( args?:any ): any;
/** [Method] This method is used by an override to call the superclass method but bypass any overridden method
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)
* @returns Object Returns the result of calling the superclass method
*/
static callSuper( args?:any ): any;
/** [Method] */
static destroy(): void;
/** [Method] Returns the initial configuration passed to constructor
* @param name String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.
* @returns Object/Mixed
*/
static getInitialConfig( name?:string ): any;
/** [Method] Initialize configuration for this class
* @param el Object
* @param runConfig Object
* @returns Object mixins The mixin prototypes as key - value pairs
*/
static initConfig( el?:any, runConfig?:any ): any;
/** [Method] Used to run an animation on a specific element
* @param el Ext.Element/HTMLElement The element to animate.
* @param anim String The animation type, defined in Ext.anims.
* @param config Object The config object for the animation.
*/
static run( el?:any, anim?:string, config?:any ): void;
/** [Method] Get the reference to the class from which this object was instantiated
* @returns Ext.Class
*/
static statics(): Ext.IClass;
}
}
declare module Ext {
export interface IAnimationQueue extends Ext.IBase {
}
export class AnimationQueue {
/** [Property] (Ext.Class) */
static self: Ext.IClass;
/** [Method] Call the original method that was previously overridden with override This method is deprecated as callParent does
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)
* @returns Object Returns the result of calling the overridden method
*/
static callOverridden( args?:any ): any;
/** [Method] Call the parent method of the current method
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)
* @returns Object Returns the result of calling the parent method
*/
static callParent( args?:any ): any;
/** [Method] This method is used by an override to call the superclass method but bypass any overridden method
* @param args Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)
* @returns Object Returns the result of calling the superclass method
*/
static callSuper( args?:any ): any;
/** [Method] */
static destroy(): void;
/** [Method] Returns the initial configuration passed to constructor
* @param name String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.
* @returns Object/Mixed
*/
static getInitialConfig( name?:string ): any;
/** [Method] Initialize configuration for this class
* @param instanceConfig Object
* @returns Object mixins The mixin prototypes as key - value pairs
*/
static initConfig( instanceConfig?:any ): any;
/** [Method]
* @param fn Function
* @param scope Object
* @param args Object
*/
static start( fn?:any, scope?:any, args?:any ): void;
/** [Method] Get the reference to the class from which this object was instantiated
* @returns Ext.Class
*/
static statics(): Ext.IClass;
/** [Method]
* @param fn Function
* @param scope Object
* @param args Object
*/
static stop( fn?:any, scope?:any, args?:any ): void;
}
}
declare module Ext {
export interface IAnims {
}
export class Anims {
/** [Property] (Object) */
static cube: any;
/** [Property] (Object) */
static fade: any;
/** [Property] (Object) */
static flip: any;
/** [Property] (Object) */
static pop: any;
/** [Property] (Object) */
static slide: any;
/** [Property] (Object) */
static wipe: any;
}
}
declare module Ext.app {
export interface IAction extends Ext.IBase {
/** [Config Option] (String) */
action?: string;
/** [Config Option] (Ext.app.Application) */
application?: Ext.app.IApplication;
/** [Config Option] (Array) */
args?: any[];
/** [Config Option] (Array) */
beforeFilters?: any[];
/** [Config Option] (Ext.app.Controller) */
controller?: Ext.app.IController;
/** [Config Option] (Object) */
scope?: any;
/** [Config Option] (String) */
url?: string;
/** [Method] Starts execution of this Action by calling each of the beforeFilters in turn if any are specified before calling t */
execute?(): void;
/** [Method] Returns the value of action
* @returns String
*/
getAction?(): string;
/** [Method] Returns the value of application
* @returns Ext.app.Application
*/
getApplication?(): Ext.app.IApplication;
/** [Method] Returns the value of args
* @returns Array
*/
getArgs?(): any[];
/** [Method] Returns the value of beforeFilters
* @returns Array
*/
getBeforeFilters?(): any[];
/** [Method] Returns the value of controller
* @returns Ext.app.Controller
*/
getController?(): Ext.app.IController;
/** [Method] Returns the value of data
* @returns Object
*/
getData?(): any;
/** [Method] Returns the value of scope
* @returns Object
*/
getScope?(): any;
/** [Method] Returns the value of title
* @returns Object
*/
getTitle?(): any;
/** [Method] Returns the value of url
* @returns String
*/
getUrl?(): string;
/** [Method] Resumes the execution of this Action or starts it if it had not been started already */
resume?(): void;
/** [Method] Sets the value of action
* @param action String The new value.
*/
setAction?( action?:string ): void;
/** [Method] Sets the value of application
* @param application Ext.app.Application The new value.
*/
setApplication?( application?:Ext.app.IApplication ): void;
/** [Method] Sets the value of args
* @param args Array The new value.
*/
setArgs?( args?:any[] ): void;
/** [Method] Sets the value of beforeFilters
* @param beforeFilters Array The new value.
*/
setBeforeFilters?( beforeFilters?:any[] ): void;
/** [Method] Sets the value of controller
* @param controller Ext.app.Controller The new value.
*/
setController?( controller?:Ext.app.IController ): void;
/** [Method] Sets the value of data
* @param data Object The new value.
*/
setData?( data?:any ): void;
/** [Method] Sets the value of scope
* @param scope Object The new value.
*/
setScope?( scope?:any ): void;
/** [Method] Sets the value of title
* @param title Object The new value.
*/
setTitle?( title?:any ): void;
/** [Method] Sets the value of url
* @param url String The new value.
*/
setUrl?( url?:string ): void;
}
}
declare module Ext.app {
export interface IApplication extends Ext.app.IController {
/** [Config Option] (String) */
appFolder?: string;
/** [Config Option] (Array) */
controllers?: any[];
/** [Config Option] (Ext.app.Profile) */
currentProfile?: Ext.app.IProfile;
/** [Config Option] (Boolean) */
glossOnIcon?: boolean;
/** [Config Option] (Ext.app.History) */
history?: Ext.app.IHistory;
/** [Config Option] (String/Object) */
icon?: any;
/** [Config Option] (Boolean) */
isIconPrecomposed?: boolean;
/** [Config Option] (Function) */
launch?: any;
/** [Config Option] (String) */
name?: string;
/** [Config Option] (String) */
phoneIcon?: string;
/** [Config Option] (String) */
phoneStartupScreen?: string;
/** [Config Option] (Array) */
profiles?: any[];
/** [Config Option] (String[]) */
requires?: string[];
/** [Config Option] (Ext.app.Router) */
router?: Ext.app.IRouter;
/** [Config Option] (Object) */
startupImage?: any;
/** [Config Option] (String) */
statusBarStyle?: string;
/** [Config Option] (String) */
tabletIcon?: string;
/** [Config Option] (String) */
tabletStartupScreen?: string;
/** [Config Option] (String/Function) */
themeVariation?: any;
/** [Config Option] (String) */
themeVariationPrefix?: string;
/** [Config Option] (String) */
themeVariationTransitionCls?: string;
/** [Method] Dispatches a given Ext app Action to the relevant Controller instance
* @param action Ext.app.Action The action to dispatch.
* @param addToHistory Boolean Sets the browser's url to the action's url.
*/
dispatch?( action?:Ext.app.IAction, addToHistory?:boolean ): void;
/** [Method] Returns the value of appFolder
* @returns String
*/
getAppFolder?(): string;
/** [Method] Returns the Controller instance for the given controller name
* @param name String The name of the Controller.
* @param profileName String Optional profile name. If passed, this is the same as calling getController('profileName.controllerName').
* @returns Ext.app.Controller controller instance or undefined.
*/
getController?( name?:string, profileName?:string ): Ext.app.IController;
/** [Method] Returns the value of controllers
* @returns Array
*/
getControllers?(): any[];
/** [Method] Returns the value of currentProfile
* @returns Ext.app.Profile
*/
getCurrentProfile?(): Ext.app.IProfile;
/** [Method] Returns the value of history
* @returns Ext.app.History
*/
getHistory?(): Ext.app.IHistory;
/** [Method] Returns the value of launch
* @returns Function
*/
getLaunch?(): any;
/** [Method] Returns the value of name
* @returns String
*/
getName?(): string;
/** [Method] Returns the value of profiles
* @returns Array
*/
getProfiles?(): any[];
/** [Method] Returns the value of requires
* @returns String[]
*/
getRequires?(): string[];
/** [Method] Returns the value of router
* @returns Ext.app.Router
*/
getRouter?(): Ext.app.IRouter;
/** [Method] Returns the value of themeVariation
* @returns String/Function
*/
getThemeVariation?(): any;
/** [Method] Returns the value of themeVariationPrefix
* @returns String
*/
getThemeVariationPrefix?(): string;
/** [Method] Returns the value of themeVariationTransitionCls
* @returns String
*/
getThemeVariationTransitionCls?(): string;
/** [Method] Redirects the browser to the given url
* @param url String/Ext.data.Model The String url to redirect to.
*/
redirectTo?( url?:any ): void;
/** [Method] Sets the value of appFolder
* @param appFolder String The new value.
*/
setAppFolder?( appFolder?:string ): void;
/** [Method] Sets the value of controllers
* @param controllers Array The new value.
*/
setControllers?( controllers?:any[] ): void;
/** [Method] Sets the value of currentProfile
* @param currentProfile Ext.app.Profile The new value.
*/
setCurrentProfile?( currentProfile?:Ext.app.IProfile ): void;
/** [Method] Sets the value of history
* @param history Ext.app.History The new value.
*/
setHistory?( history?:Ext.app.IHistory ): void;
/** [Method] Sets the value of launch
* @param launch Function The new value.
*/
setLaunch?( launch?:any ): void;
/** [Method] Sets the value of name
* @param name String The new value.
*/
setName?( name?:string ): void;
/** [Method] Sets the value of profiles
* @param profiles Array The new value.
*/
setProfiles?( profiles?:any[] ): void;
/** [Method] Sets the value of requires
* @param requires String[] The new value.
*/
setRequires?( requires?:string[] ): void;
/** [Method] Sets the value of router
* @param router Ext.app.Router The new value.
*/
setRouter?( router?:Ext.app.IRouter ): void;
/** [Method] Sets the value of themeVariation
* @param themeVariation String/Function The new value.
*/
setThemeVariation?( themeVariation?:any ): void;
/** [Method] Sets the value of themeVariationPrefix
* @param themeVariationPrefix String The new value.
*/
setThemeVariationPrefix?( themeVariationPrefix?:string ): void;
/** [Method] Sets the value of themeVariationTransitionCls
* @param themeVariationTransitionCls String The new value.
*/
setThemeVariationTransitionCls?( themeVariationTransitionCls?:string ): void;
}
}
declare module Ext.app {
export interface IController extends Ext.IBase,Ext.mixin.IObservable {
/** [Config Option] (Ext.app.Application) */
application?: Ext.app.IApplication;
/** [Config Option] (Object) */
before?: any;
/** [Config Option] (Object) */
control?: any;
/** [Config Option] (Function) */
init?: any;
/** [Config Option] (Function) */
launch?: any;
/** [Config Option] (String[]) */
models?: string[];
/** [Config Option] (Object) */
refs?: any;
/** [Config Option] (Object) */
routes?: any;
/** [Config Option] (String[]) */
stores?: string[];
/** [Config Option] (Array) */
views?: any[];
/** [Method] Appends an after event handler
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
addAfterListener?( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Appends a before event handler
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
addBeforeListener?( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Adds the specified events to the list of events which this Observable may fire
* @param eventNames Object/String... Either an object with event names as properties with a value of true or the first event name string if multiple event names are being passed as separate parameters.
*/
addEvents?( eventNames?:any ): void;
/** [Method] Appends an event handler to this object
* @param eventName String/String[]/Object The name of the event to listen for. May also be an object who's property names are event names.
* @param fn Function/String The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.
* @param scope Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.
* @param options Object An object containing handler configuration. This object may contain any of the following properties:
* @param order String The order of when the listener should be added into the listener queue. Possible values are before, current and after.
*/
addListener?( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Adds listeners to any Observable object or Element which are automatically removed when this Component is destroyed
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
* @param options Object If the eventName parameter was an event name, this is the addListener options.
*/
addManagedListener?( object?:any, eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Removes all listeners for this object */
clearListeners?(): void;
/** [Method] */
destroy?(): void;
/** [Method] Enables events fired by this Observable to bubble up an owner hierarchy by calling this getBubbleTarget if present
* @param events String/String[] The event name to bubble, or an Array of event names.
*/
enableBubble?( events?:any ): void;
/** [Method] Fires the specified event with the passed parameters and execute a function action at the end if there are no liste
* @param eventName String The name of the event to fire.
* @param args Array Arguments to pass to handers.
* @param fn Function Action.
* @param scope Object Scope of fn.
* @returns Object
*/
fireAction?( eventName?:string, args?:any[], fn?:any, scope?:any ): any;
/** [Method] Fires the specified event with the passed parameters minus the event name plus the options object passed to addList
* @param eventName String The name of the event to fire.
* @param args Object... Variable number of parameters are passed to handlers.
* @returns Boolean Returns false if any of the handlers return false.
*/
fireEvent?( eventName:string, ...args:any[] ): boolean;
/** [Method] Returns the value of application
* @returns Ext.app.Application
*/
getApplication?(): Ext.app.IApplication;
/** [Method] Returns the value of before
* @returns Object
*/
getBefore?(): any;
/** [Method] Returns the value of bubbleEvents
* @returns String/String[]
*/
getBubbleEvents?(): any;
/** [Method] Returns the value of control
* @returns Object
*/
getControl?(): any;
/** [Method] Returns a reference to another Controller
* @param controllerName String
* @param profile String
* @returns Object
*/
getController?( controllerName?:string, profile?:string ): any;
/** [Method] Returns the value of listeners
* @returns Object
*/
getListeners?(): any;
/** [Method] Returns a reference to a Model
* @param modelName String
* @returns Object
*/
getModel?( modelName?:string ): any;
/** [Method] Returns the value of models
* @returns String[]
*/
getModels?(): string[];
/** [Method] Returns the value of refs
* @returns Object
*/
getRefs?(): any;
/** [Method] Returns the value of routes
* @returns Object
*/
getRoutes?(): any;
/** [Method] Returns the value of stores
* @returns String[]
*/
getStores?(): string[];
/** [Method] Returns the value of views
* @returns Array
*/
getViews?(): any[];
/** [Method] Checks to see if this object has any listeners for a specified event
* @param eventName String The name of the event to check for
* @returns Boolean True if the event is being listened for, else false
*/
hasListener?( eventName?:string ): boolean;
/** [Method] Alias for addManagedListener
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
* @param options Object If the eventName parameter was an event name, this is the addListener options.
*/
mon?( object?:any, eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Alias for removeManagedListener
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @param fn Function If the eventName parameter was an event name, this is the handler function.
* @param scope Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.
*/
mun?( object?:any, eventName?:any, fn?:any, scope?:any ): void;
/** [Method] Alias for addListener
* @param eventName String/String[]/Object The name of the event to listen for. May also be an object who's property names are event names.
* @param fn Function/String The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.
* @param scope Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.
* @param options Object An object containing handler configuration. This object may contain any of the following properties:
* @param order String The order of when the listener should be added into the listener queue. Possible values are before, current and after.
*/
on?( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Alias for addAfterListener
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
onAfter?( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Alias for addBeforeListener
* @param eventName String/String[]/Object The name of the event to listen for.
* @param fn Function/String The method the event invokes.
* @param scope Object The scope for fn.
* @param options Object An object containing handler configuration.
*/
onBefore?( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Convenient way to redirect to a new url
* @param place Object
* @returns Object
*/
redirectTo?( place?:any ): any;
/** [Method] Relays selected events from the specified Observable as if the events were fired by this
* @param object Object The Observable whose events this object is to relay.
* @param events String/Array/Object Array of event names to relay.
* @returns Ext.mixin.Observable this
*/
relayEvents?( object?:any, events?:any ): Ext.mixin.IObservable;
/** [Method] Removes a before event handler
* @param eventName String/String[]/Object The name of the event the handler was associated with.
* @param fn Function/String The handler to remove.
* @param scope Object The scope originally specified for fn.
* @param options Object Extra options object.
*/
removeAfterListener?( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Removes a before event handler
* @param eventName String/String[]/Object The name of the event the handler was associated with.
* @param fn Function/String The handler to remove.
* @param scope Object The scope originally specified for fn.
* @param options Object Extra options object.
*/
removeBeforeListener?( eventName?:any, fn?:any, scope?:any, options?:any ): void;
/** [Method] Removes an event handler
* @param eventName String/String[]/Object The type of event the handler was associated with.
* @param fn Function/String The handler to remove. This must be a reference to the function passed into the addListener call.
* @param scope Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.
* @param options Object Extra options object. See addListener for details.
* @param order String The order of the listener to remove. Possible values are before, current and after.
*/
removeListener?( eventName?:any, fn?:any, scope?:any, options?:any, order?:string ): void;
/** [Method] Adds listeners to any Observable object or Element which are automatically removed when this Component is destroyed
* @param object Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.
* @param eventName Object/String The event name, or an object containing event name properties.
* @p