mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge branch 'master' of https://github.com/borisyankov/DefinitelyTyped
This commit is contained in:
Vendored
+641
@@ -0,0 +1,641 @@
|
||||
// Type definitions for Angular JS 1.0
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="jquery-1.8.d.ts" />
|
||||
|
||||
declare var angular: ng.IAngularStatic;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ng module (angular.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng {
|
||||
|
||||
// For the sake of simplicity, let's assume jQuery is always preferred
|
||||
interface IJQLiteOrBetter extends JQuery { }
|
||||
|
||||
// All service providers extend this interface
|
||||
interface IServiceProvider {
|
||||
$get(): any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AngularStatic
|
||||
// see http://docs.angularjs.org/api
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAngularStatic {
|
||||
bind(context: any, fn: Function, ...args: any[]): Function;
|
||||
bootstrap(element: string, modules?: any[]): auto.IInjectorService;
|
||||
bootstrap(element: IJQLiteOrBetter, modules?: any[]): auto.IInjectorService;
|
||||
bootstrap(element: Element, modules?: any[]): auto.IInjectorService;
|
||||
copy(source: any, destination?: any): any;
|
||||
element: IJQLiteOrBetter;
|
||||
equals(value1: any, value2: any): bool;
|
||||
extend(destination: any, ...sources: any[]): any;
|
||||
forEach(obj: any, iterator: (value, key) => any, context?: any): any;
|
||||
fromJson(json: string): any;
|
||||
identity(arg?: any): any;
|
||||
injector(modules?: any[]): auto.IInjectorService;
|
||||
isArray(value: any): bool;
|
||||
isDate(value: any): bool;
|
||||
isDefined(value: any): bool;
|
||||
isElement(value: any): bool;
|
||||
isFunction(value: any): bool;
|
||||
isNumber(value: any): bool;
|
||||
isObject(value: any): bool;
|
||||
isString(value: any): bool;
|
||||
isUndefined(value: any): bool;
|
||||
lowercase(str: string): string;
|
||||
module(name: string, requires?: string[], configFunction?: Function): IModule;
|
||||
noop(...args: any[]): void;
|
||||
toJson(obj: any, pretty?: bool): string;
|
||||
uppercase(str: string): string;
|
||||
version: {
|
||||
full: string;
|
||||
major: number;
|
||||
minor: number;
|
||||
dot: number;
|
||||
codename: string;
|
||||
};
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Module
|
||||
// see http://docs.angularjs.org/api/angular.Module
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IModule {
|
||||
config(configFn: Function): IModule;
|
||||
config(inlineAnnotadedFunction: any[]): IModule;
|
||||
constant(name: string, value: any): IModule;
|
||||
controller(name: string, controllerConstructor: Function): IModule;
|
||||
controller(name: string, inlineAnnotadedConstructor: any[]): IModule;
|
||||
directive(name: string, directiveFactory: Function): IModule;
|
||||
directive(name: string, inlineAnnotadedFunction: any[]): IModule;
|
||||
factory(name: string, serviceFactoryFunction: Function): IModule;
|
||||
factory(name: string, inlineAnnotadedFunction: any[]): IModule;
|
||||
filter(name: string, filterFactoryFunction: Function): IModule;
|
||||
filter(name: string, inlineAnnotadedFunction: any[]): IModule;
|
||||
provider(name: string, serviceProviderConstructor: Function): IModule;
|
||||
provider(name: string, inlineAnnotadedConstructor: any[]): IModule;
|
||||
run(initializationFunction: Function): IModule;
|
||||
run(inlineAnnotadedFunction: any[]): IModule;
|
||||
service(name: string, serviceConstructor: Function): IModule;
|
||||
service(name: string, inlineAnnotadedConstructor: any[]): IModule;
|
||||
value(name: string, value: any): IModule;
|
||||
|
||||
// Properties
|
||||
name: string;
|
||||
requires: string[];
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Attributes
|
||||
// see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAttributes {
|
||||
$set(name: string, value: any): void;
|
||||
$attr: any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// FormController
|
||||
// see http://docs.angularjs.org/api/ng.directive:form.FormController
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IFormController {
|
||||
$pristine: bool;
|
||||
$dirty: bool;
|
||||
$valid: bool;
|
||||
$invalid: bool;
|
||||
$error: any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// NgModelController
|
||||
// see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface INgModelController {
|
||||
$render(): void;
|
||||
$setValidity(validationErrorKey: string, isValid: bool): void;
|
||||
$setViewValue(value: string): void;
|
||||
|
||||
// XXX Not sure about the types here. Documentation states it's a string, but
|
||||
// I've seen it receiving other types throughout the code.
|
||||
// Falling back to any for now.
|
||||
$viewValue: any;
|
||||
|
||||
// XXX Same as avove
|
||||
$modelValue: any;
|
||||
|
||||
$parsers: IModelParser[];
|
||||
$formatters: IModelFormatter[];
|
||||
$error: any;
|
||||
$pristine: bool;
|
||||
$dirty: bool;
|
||||
$valid: bool;
|
||||
$invalid: bool;
|
||||
}
|
||||
|
||||
interface IModelParser {
|
||||
(value: any): any;
|
||||
}
|
||||
|
||||
interface IModelFormatter {
|
||||
(value: any): any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Scope
|
||||
// see http://docs.angularjs.org/api/ng.$rootScope.Scope
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IScope {
|
||||
// Documentation says exp is optional, but actual implementaton counts on it
|
||||
$apply(exp: string): any;
|
||||
$apply(exp: (scope: IScope) => any): any;
|
||||
|
||||
$broadcast(name: string, ...args: any[]): IAngularEvent;
|
||||
$destroy(): void;
|
||||
$digest(): void;
|
||||
$emit(name: string, ...args: any[]): IAngularEvent;
|
||||
|
||||
// Documentation says exp is optional, but actual implementaton counts on it
|
||||
$eval(expression: string): any;
|
||||
$eval(expression: (scope: IScope) => any): any;
|
||||
|
||||
// Documentation says exp is optional, but actual implementaton counts on it
|
||||
$evalAsync(expression: string): void;
|
||||
$evalAsync(expression: (scope: IScope) => any): void;
|
||||
|
||||
// Defaults to false by the implementation checking strategy
|
||||
$new(isolate?: bool): IScope;
|
||||
|
||||
$on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function;
|
||||
|
||||
$watch(watchExpression: string, listener?: string, objectEquality?: bool): Function;
|
||||
$watch(watchExpression: string, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: bool): Function;
|
||||
$watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: bool): Function;
|
||||
$watch(watchExpression: (scope: IScope) => any, listener?: (newValue: any, oldValue: any, scope: IScope) => any, objectEquality?: bool): Function;
|
||||
|
||||
$id: number;
|
||||
}
|
||||
|
||||
interface IAngularEvent {
|
||||
targetScope: IScope;
|
||||
currentScope: IScope;
|
||||
name: string;
|
||||
preventDefault: Function;
|
||||
defaultPrevented: bool;
|
||||
|
||||
// Available only events that were $emit-ted
|
||||
stopPropagation?: Function;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WindowService
|
||||
// see http://docs.angularjs.org/api/ng.$window
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IWindowService extends Window {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// BrowserService
|
||||
// TODO undocumented, so we need to get it from the source code
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IBrowserService {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// TimeoutService
|
||||
// see http://docs.angularjs.org/api/ng.$timeout
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ITimeoutService {
|
||||
(func: Function, delay?: number, invokeApply?: bool): IPromise;
|
||||
cancel(promise: IPromise): bool;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// FilterService
|
||||
// see http://docs.angularjs.org/api/ng.$filter
|
||||
// see http://docs.angularjs.org/api/ng.$filterProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IFilterService {
|
||||
(name: string): Function;
|
||||
}
|
||||
|
||||
interface IFilterProvider extends IServiceProvider {
|
||||
register(name: string, filterFactory: Function): IServiceProvider;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// LocaleService
|
||||
// see http://docs.angularjs.org/api/ng.$locale
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ILocaleService {
|
||||
id: string;
|
||||
|
||||
// These are not documented
|
||||
// Check angular's i18n files for exemples
|
||||
NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
|
||||
DATETIME_FORMATS: ILacaleDateTimeFormatDescriptor;
|
||||
pluralCat: (num: any) => string;
|
||||
}
|
||||
|
||||
interface ILocaleNumberFormatDescriptor {
|
||||
DECIMAL_SEP: string;
|
||||
GROUP_SEP: string;
|
||||
PATTERNS: ILocaleNumberPatternDescriptor[];
|
||||
CURRENCY_SYM: string;
|
||||
}
|
||||
|
||||
interface ILocaleNumberPatternDescriptor {
|
||||
minInt: number;
|
||||
minFrac: number;
|
||||
maxFrac: number;
|
||||
posPre: string;
|
||||
posSuf: string;
|
||||
negPre: string;
|
||||
negSuf: string;
|
||||
gSize: number;
|
||||
lgSize: number;
|
||||
}
|
||||
|
||||
interface ILacaleDateTimeFormatDescriptor {
|
||||
MONTH: string[];
|
||||
SHORTMONTH: string[];
|
||||
DAY: string[];
|
||||
SHORTDAY: string[];
|
||||
AMPMS: string[];
|
||||
medium: string;
|
||||
short: string;
|
||||
fullDate: string;
|
||||
longDate: string;
|
||||
mediumDate: string;
|
||||
shortDate: string;
|
||||
mediumTime: string;
|
||||
shortTime: string;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// LogService
|
||||
// see http://docs.angularjs.org/api/ng.$log
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ILogService {
|
||||
error: ILogCall;
|
||||
info: ILogCall;
|
||||
log: ILogCall;
|
||||
warn: ILogCall;
|
||||
}
|
||||
|
||||
// We define this as separete interface so we can reopen it later for
|
||||
// the ngMock module.
|
||||
interface ILogCall {
|
||||
(...args: any[]): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ParseService
|
||||
// see http://docs.angularjs.org/api/ng.$parse
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IParseService {
|
||||
(expression: string): ICompiledExpression;
|
||||
}
|
||||
|
||||
interface ICompiledExpression {
|
||||
(context: any, locals?: any): any;
|
||||
|
||||
// If value is not provided, undefined is gonna be used since the implementation
|
||||
// does not check the parameter. Let's force a value for consistency. If consumer
|
||||
// whants to undefine it, pass the undefined value explicitly.
|
||||
assign(context: any, value: any): any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// LocationService
|
||||
// see http://docs.angularjs.org/api/ng.$location
|
||||
// see http://docs.angularjs.org/api/ng.$locationProvider
|
||||
// see http://docs.angularjs.org/guide/dev_guide.services.$location
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ILocationService {
|
||||
absUrl(): string;
|
||||
hash(): string;
|
||||
hash(newHash: string): ILocationService;
|
||||
host(): string;
|
||||
path(): string;
|
||||
path(newPath: string): ILocationService;
|
||||
port(): number;
|
||||
protocol(): string;
|
||||
replace(): ILocationService;
|
||||
search(): string;
|
||||
search(parametersMap: any): ILocationService;
|
||||
search(parameter: string, parameterValue: any): ILocationService;
|
||||
url(): string;
|
||||
url(url: string): ILocationService;
|
||||
}
|
||||
|
||||
interface ILocationProvider extends IServiceProvider {
|
||||
hashPrefix(): string;
|
||||
hashPrefix(prefix: string): ILocationProvider;
|
||||
html5Mode(): bool;
|
||||
|
||||
// Documentation states that parameter is string, but
|
||||
// implementation tests it as boolean, which makes more sense
|
||||
// since this is a toggler
|
||||
html5Mode(active: bool): ILocationProvider;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// DocumentService
|
||||
// see http://docs.angularjs.org/api/ng.$document
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IDocumentService extends Document {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ExceptionHandlerService
|
||||
// see http://docs.angularjs.org/api/ng.$exceptionHandler
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IExceptionHandlerService {
|
||||
(exception: Error, cause?: string): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// RootElementService
|
||||
// see http://docs.angularjs.org/api/ng.$rootElement
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IRootElementService extends IJQLiteOrBetter {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// QService
|
||||
// see http://docs.angularjs.org/api/ng.$q
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IQService {
|
||||
all(promises: IPromise[]): IPromise;
|
||||
defer(): IDeferred;
|
||||
reject(reason?: any): IPromise;
|
||||
when(value: any): IPromise;
|
||||
}
|
||||
|
||||
interface IPromise {
|
||||
then(successCallback: Function, errorCallback?: Function): IPromise;
|
||||
}
|
||||
|
||||
interface IDeferred {
|
||||
resolve(value?: any): void;
|
||||
reject(reason?: string): void;
|
||||
promise: IPromise;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AnchorScrollService
|
||||
// see http://docs.angularjs.org/api/ng.$anchorScroll
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAnchorScrollService {
|
||||
(): void;
|
||||
}
|
||||
|
||||
interface IAnchorScrollProvider extends IServiceProvider {
|
||||
disableAutoScrolling(): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CacheFactoryService
|
||||
// see http://docs.angularjs.org/api/ng.$cacheFactory
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ICacheFactoryService {
|
||||
// Lets not foce the optionsMap to have the capacity member. Even though
|
||||
// it's the ONLY option considered by the implementation today, a consumer
|
||||
// might find it useful to associate some other options to the cache object.
|
||||
//(cacheId: string, optionsMap?: { capacity: number; }): CacheObject;
|
||||
(cacheId: string, optionsMap?: { capacity: number; }): ICacheObject;
|
||||
|
||||
// Methods bellow are not documented
|
||||
info(): any;
|
||||
get(cacheId: string): ICacheObject;
|
||||
}
|
||||
|
||||
interface ICacheObject {
|
||||
info(): {
|
||||
id: string;
|
||||
size: number;
|
||||
|
||||
// Not garanteed to have, since it's a non-mandatory option
|
||||
//capacity: number;
|
||||
};
|
||||
put(key: string, value?: any): void;
|
||||
get(key: string): any;
|
||||
remove(key: string): void;
|
||||
removeAll(): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CompileService
|
||||
// see http://docs.angularjs.org/api/ng.$compile
|
||||
// see http://docs.angularjs.org/api/ng.$compileProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ICompileService {
|
||||
(element: string, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction;
|
||||
(element: Element, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction;
|
||||
(element: IJQLiteOrBetter, transclude?: ITemplateLinkingFunction, maxPriority?: number): ITemplateLinkingFunction;
|
||||
}
|
||||
|
||||
interface ICompileProvider extends IServiceProvider {
|
||||
directive(name: string, directiveFactory: Function): ICompileProvider;
|
||||
|
||||
// Undocumented, but it is there...
|
||||
directive(directivesMap: any): ICompileProvider;
|
||||
}
|
||||
|
||||
interface ITemplateLinkingFunction {
|
||||
// Let's hint but not force cloneAttachFn's signature
|
||||
(scope: IScope, cloneAttachFn?: (clonedElement?: IJQLiteOrBetter, scope?: IScope) => any): IJQLiteOrBetter;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ControllerService
|
||||
// see http://docs.angularjs.org/api/ng.$controller
|
||||
// see http://docs.angularjs.org/api/ng.$controllerProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IControllerService {
|
||||
// Although the documentation doesn't state this, locals are optional
|
||||
(controllerConstructor: Function, locals?: any): any;
|
||||
(controllerName: string, locals?: any): any;
|
||||
}
|
||||
|
||||
interface IControlerProvider extends IServiceProvider {
|
||||
register(name: string, controllerConstructor: Function): void;
|
||||
register(name: string, dependencyAnnotadedConstructor: any[]): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// HttpService
|
||||
// see http://docs.angularjs.org/api/ng.$http
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IHttpService {
|
||||
// At least moethod and url must be provided...
|
||||
(config: IRequestConfig): IHttpPromise;
|
||||
get(url: string, RequestConfig?: any): IHttpPromise;
|
||||
delete(url: string, RequestConfig?: any): IHttpPromise;
|
||||
head(url: string, RequestConfig?: any): IHttpPromise;
|
||||
jsonp(url: string, RequestConfig?: any): IHttpPromise;
|
||||
post(url: string, data: any, RequestConfig?: any): IHttpPromise;
|
||||
put(url: string, data: any, RequestConfig?: any): IHttpPromise;
|
||||
defaults: IRequestConfig;
|
||||
|
||||
// For debugging, BUT it is documented as public, so...
|
||||
pendingRequests: any[];
|
||||
}
|
||||
|
||||
// This is just for hinting.
|
||||
// Some opetions might not be available depending on the request.
|
||||
// see http://docs.angularjs.org/api/ng.$http#Usage for options explanations
|
||||
interface IRequestConfig {
|
||||
method: string;
|
||||
url: string;
|
||||
params?: any;
|
||||
|
||||
// XXX it has it's own structure... perhaps we should define it in the future
|
||||
headers?: any;
|
||||
|
||||
cache?: any;
|
||||
timeout?: number;
|
||||
withCredentials?: bool;
|
||||
|
||||
// These accept multiple types, so let's defile them as any
|
||||
data?: any;
|
||||
transformRequest?: any;
|
||||
transformResponse?: any;
|
||||
}
|
||||
|
||||
interface IHttpPromise extends IPromise {
|
||||
success(callback: (data: any, status: number, headers: (headerName: string) => string, config: IRequestConfig) => any): IHttpPromise;
|
||||
error(callback: (data: any, status: number, headers: (headerName: string) => string, config: IRequestConfig) => any): IHttpPromise;
|
||||
}
|
||||
|
||||
interface IHttpProvider extends IServiceProvider {
|
||||
defaults: IRequestConfig;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// HttpBackendService
|
||||
// see http://docs.angularjs.org/api/ng.$httpBackend
|
||||
// You should never need to use this service directly.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IHttpBackendService {
|
||||
// XXX Perhaps define callback signature in the future
|
||||
(method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: bool); void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// InterpolateService
|
||||
// see http://docs.angularjs.org/api/ng.$interpolate
|
||||
// see http://docs.angularjs.org/api/ng.$interpolateProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IInterpolateService {
|
||||
(text: string, mustHaveExpression?: bool): IInterpolationFunction;
|
||||
endSymbol(): string;
|
||||
startSymbol(): string;
|
||||
}
|
||||
|
||||
interface IInterpolationFunction {
|
||||
(context: any): string;
|
||||
}
|
||||
|
||||
interface IInterpolateProvider extends IServiceProvider {
|
||||
startSymbol(): string;
|
||||
startSymbol(value: string): IInterpolateProvider;
|
||||
endSymbol(): string;
|
||||
endSymbol(value: string): IInterpolateProvider;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// RouteParamsService
|
||||
// see http://docs.angularjs.org/api/ng.$routeParams
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IRouteParamsService {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// TemplateCacheService
|
||||
// see http://docs.angularjs.org/api/ng.$templateCache
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ITemplateCacheService extends ICacheObject {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// RootScopeService
|
||||
// see http://docs.angularjs.org/api/ng.$rootScope
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IRootScopeService extends IScope {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// RouteService
|
||||
// see http://docs.angularjs.org/api/ng.$route
|
||||
// see http://docs.angularjs.org/api/ng.$routeProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IRouteService {
|
||||
reload(): void;
|
||||
routes: any;
|
||||
|
||||
// May not always be available. For instance, current will not be available
|
||||
// to a controller that was not initialized as a result of a route maching.
|
||||
current?: ICurrentRoute;
|
||||
}
|
||||
|
||||
// see http://docs.angularjs.org/api/ng.$routeProvider#when for options explanations
|
||||
interface IRoute {
|
||||
controller?: any;
|
||||
template?: string;
|
||||
templateUrl?: string;
|
||||
resolve?: any;
|
||||
redirectTo?: any;
|
||||
reloadOnSearch?: bool;
|
||||
}
|
||||
|
||||
// see http://docs.angularjs.org/api/ng.$route#current
|
||||
interface ICurrentRoute extends IRoute {
|
||||
locals: {
|
||||
$scope: IScope;
|
||||
$template: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface IRouteProviderProvider extends IServiceProvider {
|
||||
otherwise(params: any): IRouteProviderProvider;
|
||||
when(path: string, route: IRoute): IRouteProviderProvider;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AUTO module (angular.js)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
export module auto {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// InjectorService
|
||||
// see http://docs.angularjs.org/api/AUTO.$injector
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
interface IInjectorService {
|
||||
annotate(fn: Function): string[];
|
||||
annotate(inlineAnnotadedFunction: any[]): string[];
|
||||
get(name: string): any;
|
||||
instantiate(typeConstructor: Function, locals?: any): any;
|
||||
invoke(func: Function, context?: any, locals?: any): any;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// ProvideService
|
||||
// see http://docs.angularjs.org/api/AUTO.$provide
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
interface IProvideService {
|
||||
// Documentation says it returns the registered instance, but actual
|
||||
// implementation does not return anything.
|
||||
// constant(name: string, value: any): any;
|
||||
constant(name: string, value: any): void;
|
||||
|
||||
decorator(name: string, decorator: Function): void;
|
||||
factory(name: string, serviceFactoryFunction: Function): ng.IServiceProvider;
|
||||
provider(name: string, provider: ng.IServiceProvider): ng.IServiceProvider;
|
||||
provider(name: string, serviceProviderConstructor: Function): ng.IServiceProvider;
|
||||
service(name: string, constructor: Function): ng.IServiceProvider;
|
||||
value(name: string, value: any): ng.IServiceProvider;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
/// Type definitions for Angular JS 1.0 (ngCookies module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngCookies module (angular-cookies.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng.cookies {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CookieService
|
||||
// see http://docs.angularjs.org/api/ngCookies.$cookies
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ICookiesService {}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// CookieStoreService
|
||||
// see http://docs.angularjs.org/api/ngCookies.$cookieStore
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ICookieStoreService {
|
||||
get(key: string): any;
|
||||
put(key: string, value: any): void;
|
||||
remove(key: string): void;
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+154
@@ -0,0 +1,154 @@
|
||||
// Type definitions for Angular JS 1.0 (ngMock, ngMockE2E module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngMock module (angular-mocks.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AngularStatic
|
||||
// We reopen it to add the MockStatic definition
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IAngularStatic {
|
||||
mock: IMockStatic;
|
||||
}
|
||||
|
||||
interface IMockStatic {
|
||||
// see http://docs.angularjs.org/api/angular.mock.debug
|
||||
debug(obj: any): string;
|
||||
|
||||
// see http://docs.angularjs.org/api/angular.mock.inject
|
||||
inject(...fns: Function[]): void;
|
||||
|
||||
// see http://docs.angularjs.org/api/angular.mock.module
|
||||
module(...modules: any[]): any;
|
||||
|
||||
// see http://docs.angularjs.org/api/angular.mock.TzDate
|
||||
TzDate(offset: number, timestamp: number): Date;
|
||||
TzDate(offset: number, timestamp: string): Date;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ExceptionHandlerService
|
||||
// see http://docs.angularjs.org/api/ngMock.$exceptionHandler
|
||||
// see http://docs.angularjs.org/api/ngMock.$exceptionHandlerProvider
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IExceptionHandlerProvider extends IServiceProvider {
|
||||
mode(mode: string): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// TimeoutService
|
||||
// see http://docs.angularjs.org/api/ngMock.$timeout
|
||||
// Augments the original service
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ITimeoutService {
|
||||
flush(): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// LogService
|
||||
// see http://docs.angularjs.org/api/ngMock.$log
|
||||
// Augments the original service
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ILogService {
|
||||
assertEmpty(): void;
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
interface LogCall {
|
||||
logs: string[];
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// HttpBackendService
|
||||
// see http://docs.angularjs.org/api/ngMock.$httpBackend
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IHttpBackendService {
|
||||
flush(count: number): void;
|
||||
resetExpectations(): void;
|
||||
verifyNoOutstandingExpectation(): void;
|
||||
verifyNoOutstandingRequest(): void;
|
||||
|
||||
expect(method: string, url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expect(method: string, url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expect(method: string, url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expect(method: string, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expect(method: RegExp, url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expect(method: RegExp, url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expect(method: RegExp, url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expect(method: RegExp, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
|
||||
when(method: string, url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
when(method: string, url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
when(method: string, url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
when(method: string, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
when(method: RegExp, url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
when(method: RegExp, url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
when(method: RegExp, url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
when(method: RegExp, url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
|
||||
expectDELETE(url: string, headers?: any): mock.IRequestHandler;
|
||||
expectDELETE(url: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectGET(url: string, headers?: any): mock.IRequestHandler;
|
||||
expectGET(url: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectHEAD(url: string, headers?: any): mock.IRequestHandler;
|
||||
expectHEAD(url: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectJSONP(url: string): mock.IRequestHandler;
|
||||
expectJSONP(url: RegExp): mock.IRequestHandler;
|
||||
expectPATCH(url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expectPATCH(url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expectPATCH(url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectPATCH(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectPOST(url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expectPOST(url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expectPOST(url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectPOST(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectPUT(url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expectPUT(url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
expectPUT(url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
expectPUT(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
|
||||
whenDELETE(url: string, headers?: any): mock.IRequestHandler;
|
||||
whenDELETE(url: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenGET(url: string, headers?: any): mock.IRequestHandler;
|
||||
whenGET(url: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenHEAD(url: string, headers?: any): mock.IRequestHandler;
|
||||
whenHEAD(url: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenJSONP(url: string): mock.IRequestHandler;
|
||||
whenJSONP(url: RegExp): mock.IRequestHandler;
|
||||
whenPATCH(url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
whenPATCH(url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
whenPATCH(url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenPATCH(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenPOST(url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
whenPOST(url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
whenPOST(url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenPOST(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenPUT(url: string, data?: string, headers?: any): mock.IRequestHandler;
|
||||
whenPUT(url: RegExp, data?: string, headers?: any): mock.IRequestHandler;
|
||||
whenPUT(url: string, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
whenPUT(url: RegExp, data?: RegExp, headers?: any): mock.IRequestHandler;
|
||||
}
|
||||
|
||||
export module mock {
|
||||
|
||||
// returned interface by the the mocked HttpBackendService expect/when methods
|
||||
interface IRequestHandler {
|
||||
respond(func: Function): void;
|
||||
respond(status: number, data?: any, headers?: any): void;
|
||||
respond(data: any, headers?: any): void;
|
||||
|
||||
// Available wehn ngMockE2E is loaded
|
||||
passThrough(): void;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// Type definitions for Angular JS 1.0 (ngResource module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngResource module (angular-resource.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng.resource {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ResourceService
|
||||
// see http://docs.angularjs.org/api/ngResource.$resource
|
||||
// Most part of the following definitions were achieved by analyzing the
|
||||
// actual implementation, since the documentation doesn't seem to cover
|
||||
// that deeply.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IResourceService {
|
||||
(url: string, paramDefaults?: any, actionDescriptors?: any): IResourceClass;
|
||||
}
|
||||
|
||||
// Just a reference to facilitate describing new actions
|
||||
interface IActionDescriptor {
|
||||
method: string;
|
||||
isArray?: bool;
|
||||
params?: any;
|
||||
headers?: any;
|
||||
}
|
||||
|
||||
// Baseclass for everyresource with default actions.
|
||||
// If you define your new actions for the resource, you will need
|
||||
// to extend this interface and typecast the ResourceClass to it.
|
||||
interface IResourceClass {
|
||||
get: IActionCall;
|
||||
save: IActionCall;
|
||||
query: IActionCall;
|
||||
remove: IActionCall;
|
||||
delete: IActionCall;
|
||||
}
|
||||
|
||||
// In case of passing the first argument as anything but a function,
|
||||
// it's gonna be considered data if the action method is POST, PUT or
|
||||
// PATCH (in other words, methods with body). Otherwise, it's going
|
||||
// to be considered as parameters to the request.
|
||||
interface IActionCall {
|
||||
(): IResource;
|
||||
(dataOrParams: any): IResource;
|
||||
(dataOrParams: any, success: Function): IResource;
|
||||
(success: Function, error?: Function): IResource;
|
||||
(params: any, data: any, success?: Function, error?: Function): IResource;
|
||||
}
|
||||
|
||||
interface IResource {
|
||||
$save: IActionCall;
|
||||
$remove: IActionCall;
|
||||
$delete: IActionCall;
|
||||
|
||||
// No documented, but they are there, just as any custom action will be
|
||||
$query: IActionCall;
|
||||
$get: IActionCall;
|
||||
}
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// Type definitions for Angular JS 1.0 (ngSanitize module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngSanitize module (angular-sanitize.js)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
module ng.sanitize {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// SanitizeService
|
||||
// see http://docs.angularjs.org/api/ngSanitize.$sanitize
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ISanitizeService {
|
||||
(html: string): string;
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// Type definitions for Async 0.1
|
||||
// Project: https://github.com/caolan/async
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
|
||||
Vendored
+193
-132
@@ -1,169 +1,226 @@
|
||||
// Type definitions for Backbone 0.9
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
// Project: http://backbonejs.org/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="jquery-1.8.d.ts" />
|
||||
|
||||
declare module Backbone {
|
||||
|
||||
export class Events {
|
||||
on(events: string, callback: (event) => any, context?: any): any;
|
||||
off(events?: string, callback?: (event) => any, context?: any): any;
|
||||
trigger(events: string, ...args: any[]): any;
|
||||
export interface AddOptions extends Silenceable {
|
||||
at: number;
|
||||
}
|
||||
|
||||
export interface CreateOptions extends Silenceable {
|
||||
wait: bool;
|
||||
}
|
||||
|
||||
export interface HistoryOptions extends Silenceable {
|
||||
pushState: bool;
|
||||
root: string;
|
||||
}
|
||||
|
||||
export class Model {
|
||||
export interface NavigateOptions {
|
||||
trigger: bool;
|
||||
}
|
||||
|
||||
export interface RouterOptions {
|
||||
routes: any;
|
||||
}
|
||||
|
||||
export interface Silenceable {
|
||||
silent: bool;
|
||||
}
|
||||
|
||||
interface on { (eventName: string, callback: (...args: any[]) => void, context?: any): any; }
|
||||
interface off { (eventName?: string, callback?: (...args: any[]) => void, context?: any): any; }
|
||||
interface trigger { (eventName: string, ...args: any[]): any; }
|
||||
interface bind { (eventName: string, callback: (...args: any[]) => void, context?: any): any; }
|
||||
interface unbind { (eventName?: string, callback?: (...args: any[]) => void, context?: any): any; }
|
||||
|
||||
declare class Events {
|
||||
on(eventName: string, callback: (...args:any[]) => void, context?: any): any;
|
||||
off(eventName?: string, callback?: (...args:any[]) => void, context?: any): any;
|
||||
trigger(eventName: string, ...args: any[]): any;
|
||||
bind(eventName: string, callback: (...args:any[]) => void, context?: any): any;
|
||||
unbind(eventName?: string, callback?: (...args:any[]) => void, context?: any): any;
|
||||
}
|
||||
|
||||
export class ModelBase extends Events {
|
||||
fetch(options?: JQueryAjaxSettings);
|
||||
url: string; // or url(): string;
|
||||
parse(response);
|
||||
toJSON(): any;
|
||||
}
|
||||
|
||||
export class Model extends ModelBase {
|
||||
|
||||
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality
|
||||
|
||||
attributes: any;
|
||||
changed: any[];
|
||||
cid: string;
|
||||
id: any;
|
||||
idAttribute: string;
|
||||
urlRoot: string; // or urlRoot()
|
||||
|
||||
constructor (attributes?: any, options?: any);
|
||||
initialize(attributes?: any);
|
||||
|
||||
get(attributeName: string): any;
|
||||
set(attributeName: string, value: any): void;
|
||||
set(obj: any): void;
|
||||
set(attributeName: string, value: any);
|
||||
set(obj: any);
|
||||
|
||||
escape(attribute);
|
||||
has(attribute);
|
||||
unset(attribute, options? );
|
||||
clear(options? );
|
||||
|
||||
id: any;
|
||||
idAttribute: any;
|
||||
cid;
|
||||
attributes;
|
||||
changed;
|
||||
|
||||
bind(ev: string, f: Function, ctx?: any): void; /// ????
|
||||
|
||||
defaults; // or defaults();
|
||||
toJSON(): string;
|
||||
fetch(options? );
|
||||
save(attributes? , options? ): void;
|
||||
destroy(options? ): void;
|
||||
validate(attributes);
|
||||
isValid();
|
||||
url();
|
||||
urlRoot; // or urlRoot()
|
||||
parse(response);
|
||||
clone();
|
||||
isNew();
|
||||
change();
|
||||
hasChanged(attribute? );
|
||||
changedAttributes(attributes? );
|
||||
previous(attribute);
|
||||
previousAttributes();
|
||||
changedAttributes(attributes?: any): any[];
|
||||
clear(options?: Silenceable);
|
||||
clone(): Model;
|
||||
defaults(): any;
|
||||
destroy(options?: JQueryAjaxSettings);
|
||||
escape(attribute: string);
|
||||
has(attribute: string): bool;
|
||||
hasChanged(attribute?: string): bool;
|
||||
isNew(): bool;
|
||||
isValid(): string;
|
||||
previous(attribute: string): any;
|
||||
previousAttributes(): any[];
|
||||
save(attributes?: any, options?: JQueryAjaxSettings);
|
||||
unset(attribute: string, options?: Silenceable);
|
||||
validate(attributes: any): any;
|
||||
}
|
||||
|
||||
export class Collection {
|
||||
export class Collection extends ModelBase {
|
||||
|
||||
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality
|
||||
|
||||
model;
|
||||
|
||||
constructor (models? , options? );
|
||||
|
||||
models;
|
||||
toJSON(): any;
|
||||
|
||||
///// start UNDERSCORE 28:
|
||||
bind(ev: string, f: Function, ctx?: any): void;
|
||||
model: Model;
|
||||
models: any;
|
||||
collection: Model;
|
||||
create(attrs, opts? ): Collection;
|
||||
each(f: (elem: any) => void ): void;
|
||||
last(): any;
|
||||
last(n: number): any[];
|
||||
filter(f: (elem: any) => any): Collection;
|
||||
without(...values: any[]): Collection;
|
||||
|
||||
// Underscore bindings
|
||||
|
||||
each(object: any, iterator: (value, key, list? ) => void , context?: any): any[];
|
||||
forEach(object: any, iterator: (value, key, list? ) => void , context?: any): any[];
|
||||
map(object: any, iterator: (value, key, list? ) => void , context?: any): any[];
|
||||
reduce(list: any[], iterator: any, memo: (memo: any, element: any, index: number, list: any[]) => any, context?: any): any[];
|
||||
reduceRight(list: any[], iterator: (memo: any, element: any, index: number, list: any[]) => any, memo: any, context?: any): any[];
|
||||
find(list: any[], iterator: any, context?: any): any; // ???
|
||||
detect(list: any[], iterator: any, context?: any): any; // ???
|
||||
filter(list: any[], iterator: any, context?: any): any[];
|
||||
select(list: any[], iterator: any, context?: any): any[];
|
||||
reject(list: any[], iterator: any, context?: any): any[];
|
||||
every(list: any[], iterator: any, context?: any): bool;
|
||||
all(list: any[], iterator: any, context?: any): bool;
|
||||
any(list: any[], iterator?: any, context?: any): bool;
|
||||
some(list: any[], iterator?: any, context?: any): bool;
|
||||
contains(list: any, value: any): bool;
|
||||
contains(list: any[], value: any): bool;
|
||||
include(list: any, value: any): bool;
|
||||
include(list: any[], value: any): bool;
|
||||
invoke(list: any[], methodName: string, arguments: any[]): any;
|
||||
invoke(object: any, methodName: string, ...arguments: any[]): any;
|
||||
max(list: any[], iterator?: any, context?: any): any;
|
||||
min(list: any[], iterator?: any, context?: any): any;
|
||||
sortBy(list: any[], iterator?: any, context?: any): any;
|
||||
sortedIndex(list: any[], valueL: any, iterator?: any): number;
|
||||
toArray(list: any): any[];
|
||||
size(list: any): number;
|
||||
first(array: any[], n?: number): any;
|
||||
initial(array: any[], n?: number): any[];
|
||||
rest(array: any[], n?: number): any[];
|
||||
last(array: any[], n?: number): any;
|
||||
without(array: any[], ...values: any[]): any[];
|
||||
indexOf(array: any[], value: any, isSorted?: bool): number;
|
||||
shuffle(list: any[]): any[];
|
||||
lastIndexOf(array: any[], value: any, fromIndex?: number): number;
|
||||
isEmpty(object: any): bool;
|
||||
groupBy(list: any[], iterator: any): any;
|
||||
|
||||
add(models, options? );
|
||||
remove(models, options? );
|
||||
get(id);
|
||||
getByCid(cid);
|
||||
at(index: number);
|
||||
push(model, options? );
|
||||
pop(options? );
|
||||
unshift(model, options? );
|
||||
shift(options? );
|
||||
length: number;
|
||||
//comparator;
|
||||
sort(options? );
|
||||
pluck(attribute);
|
||||
where(attributes);
|
||||
url; // or url()
|
||||
parse(response);
|
||||
fetch(options?: any): void;
|
||||
reset(models, options? );
|
||||
create(attributes, options? );
|
||||
|
||||
constructor (models?: any, options?: any);
|
||||
|
||||
comparator(element: Model): number;
|
||||
comparator(element: Model): string;
|
||||
comparator(compare: Model, to?: Model): number;
|
||||
|
||||
add(model: Model, options?: AddOptions);
|
||||
add(models: Model[], options?: AddOptions);
|
||||
at(index: number): Model;
|
||||
get(id: any): Model;
|
||||
getByCid(cid): Model;
|
||||
create(attributes: any, options?: CreateOptions): Model;
|
||||
pluck(attribute: string): any[];
|
||||
push(model: Model, options?: AddOptions);
|
||||
pop(options?: Silenceable);
|
||||
remove(model: Model, options?: Silenceable);
|
||||
remove(models: Model[], options?: Silenceable);
|
||||
reset(models?: Model[], options?: Silenceable);
|
||||
shift(options?: Silenceable);
|
||||
sort(options?: Silenceable);
|
||||
unshift(model: Model, options?: AddOptions);
|
||||
where(properies: any): Model[];
|
||||
|
||||
all(iterator: (element: Model, index: number) => bool, context?: any): bool;
|
||||
any(iterator: (element: Model, index: number) => bool, context?: any): bool;
|
||||
collect(iterator: (element: Model, index: number, context?: any) => any[], context?: any): any[];
|
||||
compact(): Model[];
|
||||
contains(value: any): bool;
|
||||
countBy(iterator: (element: Model, index: number) => any): any[];
|
||||
countBy(attribute: string): any[];
|
||||
detect(iterator: (item: any) => bool, context?: any): any; // ???
|
||||
difference(...model: Model[]): Model[];
|
||||
drop(): Model;
|
||||
drop(n: number): Model[];
|
||||
each(iterator: (element: Model, index: number, list?: any) => void, context?: any);
|
||||
every(iterator: (element: Model, index: number) => bool, context?: any): bool;
|
||||
filter(iterator: (element: Model, index: number) => bool, context?: any): Model[];
|
||||
find(iterator: (element: Model, index: number) => bool, context?: any): Model;
|
||||
first(): Model;
|
||||
first(n: number): Model[];
|
||||
flatten(shallow?: bool): Model[];
|
||||
foldl(iterator: (memo: any, element: Model, index: number) => any, initialMemo: any, context?: any): any;
|
||||
forEach(iterator: (element: Model, index: number, list?: any) => void, context?: any);
|
||||
groupBy(iterator: (element: Model, index: number) => any): any[];
|
||||
groupBy(attribute: string): any[];
|
||||
include(value: any): bool;
|
||||
indexOf(element: Model, isSorted?: bool): number;
|
||||
initial(): Model;
|
||||
initial(n: number): Model[];
|
||||
inject(iterator: (memo: any, element: Model, index: number) => any, initialMemo: any, context?: any): any;
|
||||
intersection(...model: Model[]): Model[];
|
||||
isEmpty(object: any): bool;
|
||||
invoke(methodName: string, arguments?: any[]);
|
||||
last(): Model;
|
||||
last(n: number): Model[];
|
||||
lastIndexOf(element: Model, fromIndex?: number): number;
|
||||
map(iterator: (element: Model, index: number, context?: any) => any[], context?: any): any[];
|
||||
max(iterator?: (element: Model, index: number) => any, context?: any): Model;
|
||||
min(iterator?: (element: Model, index: number) => any, context?: any): Model;
|
||||
object(...values: any[]): any[];
|
||||
reduce(iterator: (memo: any, element: Model, index: number) => any, initialMemo: any, context?: any): any;
|
||||
select(iterator: any, context?: any): any[];
|
||||
size(): number;
|
||||
shuffle(): any[];
|
||||
some(iterator: (element: Model, index: number) => bool, context?: any): bool;
|
||||
sortBy(iterator: (element: Model, index: number) => number, context?: any): Model[];
|
||||
sortBy(attribute: string, context?: any): Model[];
|
||||
sortedIndex(element: Model, iterator?: (element: Model, index: number) => number): number;
|
||||
range(stop: number, step?: number);
|
||||
range(start: number, stop: number, step?: number);
|
||||
reduceRight(iterator: (memo: any, element: Model, index: number) => any, initialMemo: any, context?: any): any[];
|
||||
reject(iterator: (element: Model, index: number) => bool, context?: any): Model[];
|
||||
rest(): Model;
|
||||
rest(n: number): Model[];
|
||||
tail(): Model;
|
||||
tail(n: number): Model[];
|
||||
toArray(): any[];
|
||||
union(...model: Model[]): Model[];
|
||||
uniq(isSorted?: bool, iterator?: (element: Model, index: number) => bool): Model[];
|
||||
without(...values: any[]): Model[];
|
||||
zip(...model: Model[]): Model[];
|
||||
}
|
||||
|
||||
export class Router {
|
||||
|
||||
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality
|
||||
|
||||
routes;
|
||||
constructor (options? );
|
||||
route(route, name, callback? );
|
||||
navigate(fragment, options? );
|
||||
routes: any;
|
||||
|
||||
constructor (options?: RouterOptions);
|
||||
initialize (options?: RouterOptions);
|
||||
route(route: string, name: string, callback?: (...parameter: any[]) => void);
|
||||
navigate(fragment: string, options?: NavigateOptions);
|
||||
}
|
||||
|
||||
export var history: History;
|
||||
|
||||
export class History {
|
||||
start(options? );
|
||||
start(options?: HistoryOptions);
|
||||
navigate(fragment: string, options: any);
|
||||
pushSate();
|
||||
}
|
||||
|
||||
export class Sync {
|
||||
sync(method, model, options? );
|
||||
emulateHTTP: bool;
|
||||
emulateJSONBackbone: bool;
|
||||
export interface ViewOptions {
|
||||
model?: Backbone.Model;
|
||||
collection?: Backbone.Collection;
|
||||
el?: Element;
|
||||
id?: string;
|
||||
className?: string;
|
||||
tagName?: string;
|
||||
attributes?: any[];
|
||||
}
|
||||
|
||||
export class View {
|
||||
export class View extends Events {
|
||||
|
||||
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality
|
||||
|
||||
constructor (options?: any);
|
||||
constructor (options?: ViewOptions);
|
||||
|
||||
$(selector: string): any;
|
||||
model: Model;
|
||||
make(tagName: string, attrs? , opts? ): View;
|
||||
setElement(element: HTMLElement, delegate?: bool): void;
|
||||
make(tagName: string, attrs?, opts?): View;
|
||||
setElement(element: HTMLElement, delegate?: bool);
|
||||
tagName: string;
|
||||
events: any;
|
||||
|
||||
@@ -173,15 +230,19 @@ declare module Backbone {
|
||||
attributes;
|
||||
$(selector);
|
||||
render();
|
||||
remove(): void;;
|
||||
make(tagName, attributes? , content? );
|
||||
remove();
|
||||
make(tagName, attributes?, content?);
|
||||
//delegateEvents: any;
|
||||
delegateEvents(events?: any): any;
|
||||
undelegateEvents();
|
||||
}
|
||||
|
||||
export class Utility {
|
||||
noConflict(): any;
|
||||
setDomLibrary(jQueryNew);
|
||||
}
|
||||
}
|
||||
// SYNC
|
||||
function sync(method, model, options?: JQueryAjaxSettings);
|
||||
var emulateHTTP: bool;
|
||||
var emulateJSONBackbone: bool;
|
||||
|
||||
// Utility
|
||||
function noConflict(): Backbone;
|
||||
function setDomLibrary(jQueryNew);
|
||||
}
|
||||
|
||||
Vendored
+4
-2
@@ -1,7 +1,9 @@
|
||||
// Type definitions for Bootstrap 2.1
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
// Project: http://twitter.github.com/bootstrap/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="jquery.d.ts"/>
|
||||
/// <reference path="jquery-1.8.d.ts"/>
|
||||
|
||||
interface ModalOptions {
|
||||
backdrop?: bool;
|
||||
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for Chosen.JQuery 0.9
|
||||
// Project: http://harvesthq.github.com/chosen/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="jquery-1.8.d.ts"/>
|
||||
|
||||
interface ChosenOptions {
|
||||
allow_single_deselect?: bool;
|
||||
disable_search_threshold?: number;
|
||||
disable_search?: bool;
|
||||
search_contains?: bool;
|
||||
single_backstroke_delete?: bool;
|
||||
max_selected_options?: number;
|
||||
placeholder_text_multiple?: string;
|
||||
placeholder_text?: string;
|
||||
placeholder_text_single?: string;
|
||||
no_results_text?: string;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
chosen(): JQuery;
|
||||
chosen(options: ChosenOptions): JQuery;
|
||||
}
|
||||
Vendored
+220
@@ -0,0 +1,220 @@
|
||||
// Type definitions for CodeMirror 3.0
|
||||
// Project: http://codemirror.net
|
||||
// Definitions by: https://github.com/fdecampredon
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface CodeMirrorScrollInfo {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface CodeMirrorCoords {
|
||||
x: number;
|
||||
y: number;
|
||||
yBot: number;
|
||||
}
|
||||
|
||||
interface CodeMirrorPosition {
|
||||
line: number;
|
||||
ch: number;
|
||||
}
|
||||
|
||||
interface CodeMirrorHistorySize {
|
||||
undo: number;
|
||||
redo: number;
|
||||
}
|
||||
|
||||
interface CodeMirrorToken {
|
||||
start: number;
|
||||
end: number;
|
||||
string: string;
|
||||
className: string;
|
||||
state: any;
|
||||
}
|
||||
|
||||
interface CodeMirrorMarkTextOptions {
|
||||
inclusiveLeft: bool;
|
||||
inclusiveRight: bool;
|
||||
startStype: string;
|
||||
endStyle: string;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorBookMark {
|
||||
clear(): void;
|
||||
find(): CodeMirrorPosition;
|
||||
}
|
||||
|
||||
interface CodeMirrorLineHandle {
|
||||
|
||||
}
|
||||
|
||||
interface CodeMirrorLineInfo {
|
||||
line: number;
|
||||
handler: CodeMirrorLineHandle;
|
||||
text: string;
|
||||
markerText: string;
|
||||
markerClass: string;
|
||||
lineClass: string;
|
||||
bgClass: string;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorViewPort {
|
||||
from: number;
|
||||
to: number;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorChange {
|
||||
from: CodeMirrorPosition;
|
||||
to: CodeMirrorPosition;
|
||||
text: string[];
|
||||
next: CodeMirrorChange;
|
||||
}
|
||||
|
||||
interface CodeMirrorChangeListener {
|
||||
(editor: CodeMirrorEditor, change: CodeMirrorChange): void;
|
||||
}
|
||||
|
||||
interface CodeMirrorViewPortChangeListener {
|
||||
(editor: CodeMirrorEditor, from: CodeMirrorPosition, to: CodeMirrorPosition): void;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorStream {
|
||||
eol(): bool;
|
||||
sol(): bool;
|
||||
peek(): string;
|
||||
next(): string;
|
||||
eat(match: any): string;
|
||||
eatWhile(match: any): bool;
|
||||
eatSpace(): bool;
|
||||
skipToEnd(): void;
|
||||
skipTo(ch: string): bool;
|
||||
match(pattern: RegExp, consume: bool, caseFold: bool): bool;
|
||||
backUp(n: number): void;
|
||||
column(): number;
|
||||
indentation(): number;
|
||||
current(): string;
|
||||
string: string;
|
||||
pos: number;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorModeDefition {
|
||||
(options: CodeMirrorOptions, modeOptions: any): CodeMirrorMode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
interface CodeMirrorMode {
|
||||
startState(): any;
|
||||
token(stream: CodeMirrorStream, state: any): string;
|
||||
blankLine? (state: any): string;
|
||||
copyState? (state: any): any;
|
||||
indent? (state: any, textAfter: string, text: String): number;
|
||||
electricChars?: string;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorEditor {
|
||||
getValue(): string;
|
||||
setValue(valu: string): void;
|
||||
getSelection(): string;
|
||||
replaceSelection(value: string): void;
|
||||
setSize(width: number, height: number): void;
|
||||
focus(): void;
|
||||
scrollTo(x: number, y: number): void;
|
||||
getScrollInfo(): CodeMirrorScrollInfo;
|
||||
setOption(option: string, value: any);
|
||||
getOption(option: string): any;
|
||||
getMode(): CodeMirrorMode;
|
||||
cursorCoords(start: bool, mode: string): CodeMirrorCoords;
|
||||
charCoords(pos: CodeMirrorPosition, mode: string): CodeMirrorCoords;
|
||||
undo(): void;
|
||||
redo(): void;
|
||||
historySize(): CodeMirrorHistorySize;
|
||||
clearHistory(): void;
|
||||
getHistory(): any;
|
||||
setHistory(history: any);
|
||||
indentLine(line: number, dir?: bool);
|
||||
getTokenAt(pos: CodeMirrorPosition): CodeMirrorToken;
|
||||
markText(from: CodeMirrorPosition, to: CodeMirrorPosition, className: string,
|
||||
option?: CodeMirrorMarkTextOptions): CodeMirrorBookMark;
|
||||
setBookmark(pos: CodeMirrorPosition): CodeMirrorBookMark;
|
||||
findMarksAt(pos: CodeMirrorPosition): CodeMirrorBookMark[];
|
||||
setMarker(line: number, text: string, className: string): CodeMirrorLineHandle;
|
||||
clarMarker(line: number): void;
|
||||
setLineClass(line: number, className: string, backgroundClassName: string): CodeMirrorLineHandle;
|
||||
hideLine(line: number): CodeMirrorLineHandle;
|
||||
showLine(line: number): CodeMirrorLineHandle;
|
||||
onDeleteLine(line: number, callBack: Function);
|
||||
lineInfo(line: number): CodeMirrorLineInfo;
|
||||
getLineHandler(line: number): CodeMirrorLineHandle;
|
||||
getViewPort(): CodeMirrorViewPort;
|
||||
addWidget(pos: CodeMirrorPosition, node: Node, scrollIntoView: bool);
|
||||
matchBrackets(): void;
|
||||
lineCount(): number;
|
||||
getCursor(start?: bool): CodeMirrorPosition;
|
||||
somethingSelected(): bool;
|
||||
setCursor(pos: CodeMirrorPosition): void;
|
||||
setSelection(start: CodeMirrorPosition, end: CodeMirrorPosition): void;
|
||||
getLine(n: number): string;
|
||||
setLine(n: string, text: string): void;
|
||||
removeLine(n: number): void;
|
||||
getRange(from: CodeMirrorPosition, to: CodeMirrorPosition): string;
|
||||
replaceRange(text: string, from: CodeMirrorPosition, to?: CodeMirrorPosition): void;
|
||||
posFromIndex(index: number): CodeMirrorPosition;
|
||||
indexFromPos(pos: CodeMirrorPosition): number;
|
||||
operation(func: Function): any;
|
||||
compundChange(func: Function): any;
|
||||
refresh(): void;
|
||||
getInputField(): HTMLTextAreaElement;
|
||||
getWrapperElement(): HTMLElement;
|
||||
getScrollerElement(): HTMLElement;
|
||||
getGutterElement(): HTMLElement;
|
||||
getStateAfter(line): any;
|
||||
}
|
||||
|
||||
|
||||
interface CodeMirrorOptions {
|
||||
value?: string;
|
||||
mode?: string;
|
||||
them?: string;
|
||||
indentUnit?: number;
|
||||
smartIndend?: number;
|
||||
tabSize?: number;
|
||||
indentWithTabs?: bool;
|
||||
electricsChars?: bool;
|
||||
autoClearEmptyLines?: bool;
|
||||
keyMap?: string;
|
||||
extraKeys?: any;
|
||||
lineWrapping?: bool;
|
||||
lineNumbers?: bool;
|
||||
firstLineNumber?: bool;
|
||||
lineNumberFormatter?: Function;
|
||||
gutter?: bool;
|
||||
fixedGutter?: bool;
|
||||
readOnly?: bool;
|
||||
onChange?: CodeMirrorChangeListener;
|
||||
onCursorActivity?: Function;
|
||||
onViewportChange?: CodeMirrorViewPortChangeListener;
|
||||
//**todo finish
|
||||
}
|
||||
|
||||
|
||||
declare var CodeMirror: {
|
||||
(element: HTMLElement, options?: CodeMirrorOptions): CodeMirrorEditor;
|
||||
(element: Function, options?: CodeMirrorOptions): CodeMirrorEditor;
|
||||
version: string;
|
||||
defaults: CodeMirrorOptions;
|
||||
fromTextArea(textArea: HTMLTextAreaElement, options?: CodeMirrorOptions): CodeMirrorEditor;
|
||||
defineMode(name: string, func: CodeMirrorModeDefition);
|
||||
defineMIME(mime: string, mode: string);
|
||||
connect(target: EventTarget, event: String, func: Function);
|
||||
commands: any;
|
||||
}
|
||||
Vendored
+571
@@ -0,0 +1,571 @@
|
||||
// Type definitions for EaselJS 0.5
|
||||
// Project: http://www.createjs.com/#!/EaselJS
|
||||
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
/// <reference path="tweenjs-0.3.d.ts" />
|
||||
|
||||
// rename the native MouseEvent, to avoid conflit with createjs's MouseEvent
|
||||
interface NativeMouseEvent extends MouseEvent {
|
||||
|
||||
}
|
||||
|
||||
module createjs {
|
||||
// :: base classes :: //
|
||||
|
||||
export class DisplayObject {
|
||||
// properties
|
||||
alpha: number;
|
||||
cacheCanvas: HTMLCanvasElement;
|
||||
cacheID: number;
|
||||
compositeOperation: string;
|
||||
filters: Filter[];
|
||||
hitArea: DisplayObject;
|
||||
id: number;
|
||||
mask: Shape;
|
||||
mouseEnabled: bool;
|
||||
name: string;
|
||||
parent: DisplayObject;
|
||||
regX: number;
|
||||
regY: number;
|
||||
rotation: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
shadow: Shadow;
|
||||
skewX: number;
|
||||
skewY: number;
|
||||
snapToPixel: bool;
|
||||
static suppressCrossDomainErrors: bool;
|
||||
visible: bool;
|
||||
x: number;
|
||||
y: number;
|
||||
|
||||
// methods
|
||||
cache(x: number, y: number, width: number, height: number, scale?: number): void;
|
||||
clone(): DisplayObject;
|
||||
draw(ctx: CanvasRenderingContext2D, ignoreCache?: bool): void;
|
||||
getCacheDataURL(): string;
|
||||
getConcatenatedMatrix(mtx: Matrix2D): Matrix2D;
|
||||
getMatrix(matrix: Matrix2D): Matrix2D;
|
||||
getStage(): Stage;
|
||||
globalToLocal(x: number, y: number): Point;
|
||||
hitTest(x: number, y: number): bool;
|
||||
isVisible(): bool;
|
||||
localToGlobal(x: number, y: number): Point;
|
||||
localToLocal(x: number, y: number, target: DisplayObject): Point;
|
||||
setTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX: number, regY: number): DisplayObject;
|
||||
setupContext(ctx: CanvasRenderingContext2D): void;
|
||||
toString(): string;
|
||||
uncache(): void;
|
||||
updateCache(compositeOperation: string): void;
|
||||
|
||||
// events
|
||||
onClick: (event: MouseEvent) => any;
|
||||
onDoubleClick: (event: MouseEvent) => any;
|
||||
onMouseOut: (event: MouseEvent) => any;
|
||||
onMouseOver: (event: MouseEvent) => any;
|
||||
onPress: (event: MouseEvent) => any;
|
||||
onTick: () => any;
|
||||
}
|
||||
|
||||
|
||||
export class Filter {
|
||||
constructor ();
|
||||
applyFilter(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, targetCtx?: CanvasRenderingContext2D, targetX?: number, targetY?: number): bool;
|
||||
clone(): Filter;
|
||||
getBounds(): Rectangle;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
||||
// :: The rest :: //
|
||||
|
||||
export class AlphaMapFilter extends Filter {
|
||||
// properties
|
||||
alphaMap: any; //Image or HTMLCanvasElement
|
||||
|
||||
// methods
|
||||
constructor (alphaMap: HTMLImageElement);
|
||||
constructor (alphaMap: HTMLCanvasElement);
|
||||
clone(): AlphaMapFilter;
|
||||
}
|
||||
|
||||
|
||||
export class AlphaMaskFilter extends Filter {
|
||||
// properties
|
||||
mask: any; // HTMLImageElement or HTMLCanvasElement
|
||||
|
||||
// methods
|
||||
constructor (mask: HTMLImageElement);
|
||||
constructor (mask: HTMLCanvasElement);
|
||||
clone(): AlphaMaskFilter;
|
||||
}
|
||||
|
||||
|
||||
export class Bitmap extends DisplayObject {
|
||||
// properties
|
||||
image: any; // HTMLImageElement or HTMLCanvasElement or HTMLVideoElement
|
||||
snapToPixel: bool;
|
||||
sourceRect: Rectangle;
|
||||
|
||||
// methods
|
||||
constructor (imageOrUrl: HTMLImageElement);
|
||||
constructor (imageOrUrl: HTMLCanvasElement);
|
||||
constructor (imageOrUrl: HTMLVideoElement);
|
||||
constructor (imageOrUrl: string);
|
||||
|
||||
clone(): Bitmap;
|
||||
updateCache(): void;
|
||||
}
|
||||
|
||||
|
||||
export class BitmapAnimation extends DisplayObject {
|
||||
// properties
|
||||
currentAnimation: string;
|
||||
currentAnimationFrame: number;
|
||||
currentFrame: number;
|
||||
offset: number;
|
||||
paused: bool;
|
||||
snapToPixel: bool;
|
||||
spriteSheet: SpriteSheet;
|
||||
|
||||
// methods
|
||||
constructor (spriteSheet: SpriteSheet);
|
||||
advance(): void;
|
||||
cache(): void;
|
||||
clone(): BitmapAnimation;
|
||||
gotoAndPlay(frameOrAnimation: string): void;
|
||||
gotoAndPlay(frameOrAnimation: number): void;
|
||||
play(): void;
|
||||
stop(): void;
|
||||
updateCache(): void;
|
||||
|
||||
// events
|
||||
onAnimationEnd: (reference: BitmapAnimation, animationEnded: string) => any;
|
||||
}
|
||||
|
||||
|
||||
export class BoxBlurFilter extends Filter {
|
||||
// properties
|
||||
blurX: number;
|
||||
blurY: number;
|
||||
quality: number;
|
||||
|
||||
// methods
|
||||
constructor (blurX: number, blurY: number, quality: number);
|
||||
clone(): BoxBlurFilter;
|
||||
}
|
||||
|
||||
|
||||
export class ColorFilter extends Filter {
|
||||
// properties
|
||||
alphaOffset: number;
|
||||
blueMultiplier: number;
|
||||
blueOffset: number;
|
||||
greenMultiplier: number;
|
||||
greenOffset: number;
|
||||
redMultiplier: number;
|
||||
redOffset: number;
|
||||
|
||||
// methods
|
||||
constructor (redMultiplier?: number, greenMultiplier?: number, blueMultiplier?: number, alphaMultiplier?: number, redOffset?: number, greenOffset?: number, blueOffset?: number, alphaOffset?: number);
|
||||
clone(): ColorFilter;
|
||||
}
|
||||
|
||||
|
||||
export class ColorMatrix {
|
||||
// properties
|
||||
DELTA_INDEX: number[];
|
||||
IDENTITY_MATRIX: number[];
|
||||
LENGTH: number;
|
||||
|
||||
// methods
|
||||
constructor (brightness: number, contrast: number, saturation: number, hue: number);
|
||||
adjustBrightness(value: number): ColorMatrix;
|
||||
adjustColor(brightness: number, contrast: number, saturation: number, hue: number): ColorMatrix;
|
||||
adjustContrast(value: number): ColorMatrix;
|
||||
adjustHue(value: number): ColorMatrix;
|
||||
adjustSaturation(value: number): ColorMatrix;
|
||||
clone(): ColorMatrix;
|
||||
concat(matrix: ColorMatrix[]): ColorMatrix;
|
||||
copyMatrix(matrix: ColorMatrix[]): ColorMatrix;
|
||||
reset(): ColorMatrix;
|
||||
toArray(): number[];
|
||||
}
|
||||
|
||||
|
||||
export class ColorMatrixFilter extends Filter {
|
||||
// methods
|
||||
constructor (matrix: number[]);
|
||||
clone(): ColorMatrixFilter;
|
||||
}
|
||||
|
||||
|
||||
export class Command
|
||||
{
|
||||
// methods
|
||||
constructor (f, params, path);
|
||||
exec(scope: any): void;
|
||||
}
|
||||
|
||||
|
||||
export class Container extends DisplayObject {
|
||||
// properties
|
||||
children: DisplayObject[];
|
||||
|
||||
// methods
|
||||
addChild(...child: DisplayObject[]): DisplayObject;
|
||||
addChildAt(...childOrIndex: any[]): DisplayObject; // actually (...child: DisplayObject[], index: number)
|
||||
clone(recursive?: bool): Container;
|
||||
contains(child: DisplayObject): bool;
|
||||
getChildAt(index: number): DisplayObject;
|
||||
getChildIndex(child: DisplayObject): number;
|
||||
getNumChildren(): number;
|
||||
getObjectsUnderPoint(x, number, y: number): DisplayObject[];
|
||||
getObjectUnderPoint(x: number, y: number): DisplayObject;
|
||||
hitTest(x: number, y: number): bool;
|
||||
removeAllChildren(): void;
|
||||
removeChild(...child: DisplayObject[]): bool;
|
||||
removeChildAt(...index: number[]): bool;
|
||||
setChildIndex(child: DisplayObject, index: number): void;
|
||||
sortChildren(sortFunction: (a: DisplayObject, b: DisplayObject) => number): void;
|
||||
swapChildren(child1: DisplayObject, child2: DisplayObject): void;
|
||||
swapChildrenAt(index1: number, index2: number): void;
|
||||
}
|
||||
|
||||
|
||||
export class DOMElement extends DisplayObject {
|
||||
// properties
|
||||
htmlElement: HTMLElement;
|
||||
|
||||
// methods
|
||||
constructor (htmlElement: HTMLElement);
|
||||
clone(): DOMElement;
|
||||
}
|
||||
|
||||
|
||||
export class Graphics {
|
||||
// properties
|
||||
BASE_64: Object;
|
||||
curveTo(cpx: number, cpy: number, x: number, y: number): Graphics; // same as quadraticCurveTo()
|
||||
drawRect(x: number, y: number, width: number, height: number): Graphics; // same as rect()
|
||||
STROKE_CAPS_MAP: string[];
|
||||
STROKE_JOINTS_MAP: string[];
|
||||
|
||||
// methods
|
||||
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: bool): Graphics;
|
||||
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics;
|
||||
beginBitmapFill(image: Object, repetition?: string): Graphics;
|
||||
beginBitmapStroke(image: Object, repetition?: string): Graphics;
|
||||
beginFill(color: string): Graphics;
|
||||
beginLinearGradientFill(colors: string[], ratios: number[], x0: number, y0: number, x1: number, y1: number): Graphics;
|
||||
beginLinearGradientStroke(colors: string[], ratios: number[], x0: number, y0: number, x1: number, y1: number): Graphics;
|
||||
beginRadialGradientFill(colors: string[], ratios: number[], x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): Graphics;
|
||||
beginRadialGradientStroke(colors: string[], ratios: number[], x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): Graphics;
|
||||
beginStroke(color: string): Graphics;
|
||||
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): Graphics;
|
||||
clear(): Graphics;
|
||||
clone(): Graphics;
|
||||
closePath(): Graphics;
|
||||
decodePath(str: string): Graphics;
|
||||
draw(ctx: CanvasRenderingContext2D): void;
|
||||
drawAsPath(ctx: CanvasRenderingContext2D): void;
|
||||
drawCircle(x: number, y: number, radius: number): Graphics;
|
||||
drawEllipse(x: number, y: number, width: number, height: number): Graphics;
|
||||
drawPolyStar(x: number, y: number, radius: number, sides: number, pointSize: number, angle: number): Graphics;
|
||||
drawRoundRect(x: number, y: number, width: number, height: number, radius: number): Graphics;
|
||||
drawRoundRectComplex(x: number, y: number, width: number, height: number, radiusTL: number, radiusTR: number, radiusBR: number, radisBL: number): Graphics;
|
||||
endFill(): Graphics;
|
||||
endStroke(): Graphics;
|
||||
static getHSL(hue: number, saturation: number, lightness: number, alpha?: number): string;
|
||||
static getRGB(red: number, green: number, blue: number, alpha?: number): string;
|
||||
lineTo(x: number, y: number): Graphics;
|
||||
moveTo(x: number, y: number): Graphics;
|
||||
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): Graphics;
|
||||
rect(x: number, y: number, width: number, height: number): Graphics;
|
||||
setStrokeStyle(thickness: number, caps?: string, joints?: string, miter?: number): Graphics; // caps and joints can be a string or number
|
||||
setStrokeStyle(thickness: number, caps?: number, joints?: string, miter?: number): Graphics;
|
||||
setStrokeStyle(thickness: number, caps?: string, joints?: number, miter?: number): Graphics;
|
||||
setStrokeStyle(thickness: number, caps?: number, joints?: number, miter?: number): Graphics;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
||||
export class Matrix2D {
|
||||
// properties
|
||||
a: number;
|
||||
alpha: number;
|
||||
atx: number;
|
||||
b: number;
|
||||
c: number;
|
||||
compositeOperation: string;
|
||||
d: number;
|
||||
static DEG_TO_RAD: number;
|
||||
static identity: Matrix2D;
|
||||
shadow: Shadow;
|
||||
ty: number;
|
||||
|
||||
// methods
|
||||
constructor (a: number, b: number, c: number, d: number, tx: number, ty: number);
|
||||
append(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D;
|
||||
appendMatrix(matrix: Matrix2D): Matrix2D;
|
||||
appendProperties(a: number, b: number, c: number, d: number, tx: number, ty: number, alpha: number, shadow: Shadow, compositeOperation: string): Matrix2D;
|
||||
appendTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX?: number, regY?: number): Matrix2D;
|
||||
clone(): Matrix2D;
|
||||
decompose(target: Object): Matrix2D;
|
||||
identity(): Matrix2D;
|
||||
invert(): Matrix2D;
|
||||
isIdentity(): bool;
|
||||
prepend(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D;
|
||||
prependMatrix(matrix: Matrix2D): Matrix2D;
|
||||
prependProperties(alpha: number, shadow: Shadow, compositeOperation: string): Matrix2D;
|
||||
prependTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX?: number, regY?: number): Matrix2D;
|
||||
rotate(angle: number): Matrix2D;
|
||||
scale(x: number, y: number): Matrix2D;
|
||||
skew(skewX: number, skewY: number): Matrix2D;
|
||||
toString(): string;
|
||||
translate(x: number, y: number): Matrix2D;
|
||||
}
|
||||
|
||||
|
||||
export class MouseEvent {
|
||||
|
||||
// properties
|
||||
nativeEvent: NativeMouseEvent;
|
||||
pointerID: number;
|
||||
primaryPointer: bool;
|
||||
rawX: number;
|
||||
rawY: number;
|
||||
stageX: number;
|
||||
stageY: number;
|
||||
target: DisplayObject;
|
||||
type: string;
|
||||
|
||||
// methods
|
||||
constructor (type: string, stageX: number, stageY: number, target: DisplayObject, nativeEvent: NativeMouseEvent, pointerID: number, primary: bool, rawX: number, rawY: number);
|
||||
clone(): MouseEvent;
|
||||
toString(): string;
|
||||
|
||||
// events
|
||||
onMouseMove: (event: MouseEvent) => any;
|
||||
onMouseUp: (event: MouseEvent) => any;
|
||||
}
|
||||
|
||||
|
||||
export class MovieClip extends Container {
|
||||
// properties
|
||||
actionsEnabled: bool;
|
||||
static INDEPENDENT: string;
|
||||
loop: bool;
|
||||
mode: string;
|
||||
paused: bool;
|
||||
static SINGLE_FRAME: string;
|
||||
startPosition: number;
|
||||
static SYNCHED: string;
|
||||
timeline: Timeline; //HERE requires tweenJS
|
||||
|
||||
// methods
|
||||
constructor (mode: string, startPosition: number, loop: bool, labels: Object);
|
||||
clone(recursive?: bool): MovieClip;
|
||||
gotoAndPlay(positionOrLabel: string): void;
|
||||
gotoAndPlay(positionOrLabel: number): void;
|
||||
gotoAndStop(positionOrLabel: string): void;
|
||||
gotoAndStop(positionOrLabel: number): void;
|
||||
play(): void;
|
||||
stop(): void;
|
||||
}
|
||||
|
||||
|
||||
export class Point {
|
||||
// properties
|
||||
x: number;
|
||||
y: number;
|
||||
|
||||
// methods
|
||||
constructor (x: number, y: number);
|
||||
clone(): Point;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
||||
export class Rectangle {
|
||||
// properties
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
// methods
|
||||
constructor (x: number, y: number, width: number, height: number);
|
||||
clone(): Rectangle;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
||||
export class Shadow {
|
||||
// properties
|
||||
blur: number;
|
||||
color: string;
|
||||
static identity: Shadow;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
|
||||
// methods
|
||||
constructor (color: string, offsetX: number, offsetY: number, blur: number);
|
||||
clone(): Shadow;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
||||
export class Shape extends DisplayObject {
|
||||
// properties
|
||||
graphics: Graphics;
|
||||
|
||||
// methods
|
||||
constructor (graphics?: Graphics);
|
||||
clone(recursive?: bool): Shape;
|
||||
}
|
||||
|
||||
|
||||
// what is returned from .getAnimation()
|
||||
interface SpriteSheetAnimation {
|
||||
frames: number[];
|
||||
frequency: number;
|
||||
name: string;
|
||||
next: string;
|
||||
}
|
||||
|
||||
export class SpriteSheet {
|
||||
// properties
|
||||
complete: bool;
|
||||
|
||||
// methods
|
||||
constructor (data: Object);
|
||||
clone(): SpriteSheet;
|
||||
getAnimation(name: string): SpriteSheetAnimation;
|
||||
getAnimations(): string[];
|
||||
getFrame(frameIndex: number): Object;
|
||||
getNumFrames(animation: string): number;
|
||||
toString(): string;
|
||||
|
||||
// events
|
||||
onComplete: () => any;
|
||||
}
|
||||
|
||||
|
||||
export class SpriteSheetBuilder {
|
||||
// properties
|
||||
defaultScale: number;
|
||||
maxWidth: number;
|
||||
maxHeight: number;
|
||||
padding: number;
|
||||
spriteSheet: SpriteSheet;
|
||||
|
||||
// methods
|
||||
addFrame(source: DisplayObject, sourceRect?: Rectangle, scale?: number, setupFunction?: () => any, setupParams?: any[], setupScope?: Object): any; //HERE returns number or null
|
||||
addMovieClip(source: MovieClip, sourceRect?: Rectangle, scale?: number): void;
|
||||
build(): void;
|
||||
buildAsync(callback?: (reference: SpriteSheetBuilder) => any, timeSlice?: number): void;
|
||||
clone(): SpriteSheetBuilder;
|
||||
stopAsync(): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
||||
export class SpriteSheetUtils {
|
||||
static addFlippedFrames(spriteSheet: SpriteSheet, horizontal?: bool, vertical?: bool, both?: bool): void;
|
||||
static extractFrame(spriteSheet: HTMLImageElement, frame: number): HTMLImageElement;
|
||||
static flip(spriteSheet: HTMLImageElement, flipData: Object): void;
|
||||
static mergeAlpha(rgbImage: HTMLImageElement, alphaImage: HTMLImageElement, canvas?: HTMLCanvasElement): HTMLCanvasElement;
|
||||
}
|
||||
|
||||
|
||||
export class Stage extends Container {
|
||||
// properties
|
||||
autoClear: bool;
|
||||
canvas: HTMLCanvasElement;
|
||||
mouseInBounds: bool;
|
||||
mouseX: number;
|
||||
mouseY: number;
|
||||
snapToPixelEnabled: bool;
|
||||
tickOnUpdate: bool;
|
||||
|
||||
// methods
|
||||
constructor (canvas: HTMLCanvasElement);
|
||||
clone(): Stage;
|
||||
enableMouseOver(frequency: number): void;
|
||||
toDataURL(backgroundColor: string, mimeType: string): string;
|
||||
|
||||
// events
|
||||
onMouseDown: (event: MouseEvent) => any;
|
||||
onMouseMove: (event: MouseEvent) => any;
|
||||
onMouseUp: (event: MouseEvent) => any;
|
||||
}
|
||||
|
||||
|
||||
export class Text extends DisplayObject {
|
||||
// properties
|
||||
color: string;
|
||||
font: string;
|
||||
lineHeight: number;
|
||||
lineWidth: number;
|
||||
maxWidth: number;
|
||||
outline: bool;
|
||||
text: string;
|
||||
textAlign: string;
|
||||
textBaseline: string;
|
||||
|
||||
// methods
|
||||
constructor (text?: string, font?: string, color?: string);
|
||||
clone(): Text;
|
||||
getMeasuredHeight(): number;
|
||||
getMeasuredLineHeight(): number;
|
||||
getMeasuredWidth(): number;
|
||||
}
|
||||
|
||||
|
||||
export class Ticker {
|
||||
// properties
|
||||
static useRAF: bool;
|
||||
|
||||
// methods
|
||||
static addListener(o: Object, pauseable?: bool): void;
|
||||
static getFPS(): number;
|
||||
static getInterval(): number;
|
||||
static getMeasuredFPS(ticks?: number): number;
|
||||
static getPaused(): bool;
|
||||
static getTicks(pauseable?: bool): number;
|
||||
static getTime(pauseable: bool): number;
|
||||
static init(): void;
|
||||
static removeAllListeners(): void;
|
||||
static removeListener(o: Object): void;
|
||||
static setFPS(value: number): void;
|
||||
static setInterval(interval: number): void;
|
||||
static setPaused(value: bool): void;
|
||||
|
||||
// events
|
||||
tick: (timeElapsed: number) => any;
|
||||
}
|
||||
|
||||
|
||||
export class Touch {
|
||||
// methods
|
||||
static disable(stage: Stage): void;
|
||||
static enable(stage: Stage, singleTouch?: bool, allowDefault?: bool): bool;
|
||||
static isSupported(): bool;
|
||||
}
|
||||
|
||||
|
||||
export class UID {
|
||||
// methods
|
||||
static get(): number;
|
||||
}
|
||||
}
|
||||
Vendored
+284
-38
@@ -1,50 +1,296 @@
|
||||
// Type definitions for Ember.js 1.0
|
||||
// Type definitions for Ember.js 1.0.pre
|
||||
// Project: http://emberjs.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface EmberApplication {
|
||||
create(): EmberApplication;
|
||||
MyView: EmberView;
|
||||
declare module Ember {
|
||||
|
||||
export class CoreObject {
|
||||
isDestroyed: bool;
|
||||
isDestroying: bool;
|
||||
|
||||
destroy(): Object;
|
||||
eachComputedProperty(callback: Function, binding: Object): void;
|
||||
metaForProperty(key: string): any;
|
||||
}
|
||||
|
||||
export class Object extends CoreObject {
|
||||
|
||||
static create(...arguments: any[]): Object;
|
||||
|
||||
addObserver(key: string, target: Object, method: any): Object;
|
||||
apply(obj: Object): Object;
|
||||
beginPropertyChanges(): Observable;
|
||||
cacheFor(keyName: string): Object;
|
||||
decrementProperty(keyName: string, increment: Object): Object;
|
||||
detect(obj: Object): bool;
|
||||
endPropertyChanges(): Observable;
|
||||
get(key: string): Object;
|
||||
getProperties(...list: string[]): any;
|
||||
getProperties(list: string[]): any;
|
||||
getWithDefault(keyName: string, defaultValue: Object): Object;
|
||||
hasObserverFor(key: string): bool;
|
||||
incrementProperty(keyName: string, increment: Object): Object;
|
||||
notifyPropertyChange(keyName: string): Observable;
|
||||
propertyDidChange(keyName: string): Observable;
|
||||
propertyWillChange(key: string): Observable;
|
||||
removeObserver(key: string, target: Object, method: string): Observable;
|
||||
removeObserver(key: string, target: Object, method: Function): Observable;
|
||||
reopen(...arguments: any[]);
|
||||
set(key: string, value: Object): Observable;
|
||||
setProperties(hash: any): Observable;
|
||||
setUnknownProperty(key: string, value: Object): void;
|
||||
toggleProperty(keyName: string): Object;
|
||||
unknownProperty(key: string): Object;
|
||||
}
|
||||
|
||||
export interface Mixin {
|
||||
apply(obj: Object): Object;
|
||||
create(obj: Object): Object;
|
||||
detect(obj: Object): bool;
|
||||
extend(first: Object, second: Object): Object;
|
||||
reopen(...arguments: any[]): Mixin;
|
||||
}
|
||||
|
||||
export class View extends Object {
|
||||
append(): View;
|
||||
static create(...arguments: any[]): View;
|
||||
}
|
||||
|
||||
export interface Enumerable extends Mixin {
|
||||
// Fields
|
||||
firstObject: Object;
|
||||
hasEnumerableObservers: bool;
|
||||
lastObject: Object;
|
||||
nextObject: Object;
|
||||
|
||||
// Methods
|
||||
addEnumerableObserver(target, opts);
|
||||
compact(): any[];
|
||||
contains(obj: Object): bool;
|
||||
enumerableContentDidChange(removing: number, adding: number): Object;
|
||||
enumerableContentDidChange(removing: Ember.Enumerable, adding: Ember.Enumerable): Object;
|
||||
enumerableContentDidChange(start: Number, removing: number, adding: number): Object;
|
||||
enumerableContentDidChange(start: Number, removing: Ember.Enumerable, adding: Ember.Enumerable): Object;
|
||||
|
||||
enumerableContentWillChange(removing: number, adding: number): Ember.Enumerable;
|
||||
enumerableContentWillChange(removing: Ember.Enumerable, adding: Ember.Enumerable): Ember.Enumerable;
|
||||
enumerableContentWillChange(start: Number, removing: number, adding: number): Ember.Enumerable;
|
||||
enumerableContentWillChange(start: Number, removing: Ember.Enumerable, adding: Ember.Enumerable): Ember.Enumerable;
|
||||
|
||||
every(callback: Function, target?: Object): bool;
|
||||
everyProperty(key: string, value?: string): any[];
|
||||
filter(callback: Function, target?: Object): any[];
|
||||
filterProperty(key: string, value?: string): any[];
|
||||
find(callback: Function, target?: Object): Object;
|
||||
findProperty(key: string, value?: string): Object;
|
||||
/*forEach
|
||||
getEach
|
||||
invoke
|
||||
map
|
||||
mapProperty
|
||||
reduce
|
||||
removeEnumerableObserver
|
||||
setEach
|
||||
some
|
||||
someProperty
|
||||
toArray
|
||||
uniq
|
||||
without*/
|
||||
}
|
||||
|
||||
export interface NativeArray extends Array {
|
||||
activate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
export class Application extends Object {
|
||||
customEvents: Object;
|
||||
eventDispatcher: EventDispatcher;
|
||||
// rootElement: DOMElement;
|
||||
ready;
|
||||
static create(...arguments: any[]): Application;
|
||||
initialize(router: Router);
|
||||
}
|
||||
|
||||
export class Router {
|
||||
|
||||
}
|
||||
|
||||
export class EventDispatcher {
|
||||
}
|
||||
|
||||
export class Binding {
|
||||
static from();
|
||||
static oneWay(path: string, flag?: bool);
|
||||
static to();
|
||||
|
||||
connect(obj: Object): Binding;
|
||||
copy(): Binding;
|
||||
disconnect(obj: Object): Binding;
|
||||
from(path: string): Binding;
|
||||
oneWay(): Binding;
|
||||
to(propertyPath: string): Binding;
|
||||
}
|
||||
|
||||
export interface ComputedProperty {
|
||||
cacheable(aFlag?: bool): ComputedProperty;
|
||||
meta(hash: any): ComputedProperty;
|
||||
property(path: string): ComputedProperty;
|
||||
volatile(): ComputedProperty;
|
||||
}
|
||||
|
||||
export interface Map {
|
||||
|
||||
}
|
||||
|
||||
export interface Observable extends Mixin {
|
||||
addBeforeObserver(key, target, method);
|
||||
addObject(obj: Object);
|
||||
addObserver(key: string, target: Object, method: Function): Ember.Object;
|
||||
addObserver(key: string, target: Object, method: string): Ember.Object;
|
||||
beginPropertyChanges(): Ember.Observable;
|
||||
cacheFor(keyName: string): Object;
|
||||
contentArrayDidChange(array, idx, removedCount, addedCount);
|
||||
contentArrayWillChange(array, idx, removedCount, addedCount);
|
||||
contentItemSortPropertyDidChange(item);
|
||||
decrementProperty(keyName: string, increment: Object): Object;
|
||||
destroy();
|
||||
endPropertyChanges(): Ember.Observable;
|
||||
get(key: string): Object;
|
||||
getPath(path: string): Object;
|
||||
getProperties(...list: string[]): any;
|
||||
getProperties(list: any[]): any;
|
||||
getWithDefault(keyName: string, defaultValue: Object): Object;
|
||||
hasObserverFor(key: string): bool;
|
||||
incrementProperty(keyName: string, increment: Object): Object;
|
||||
insertItemSorted(item);
|
||||
notifyPropertyChange(keyName: string): Ember.Observable;
|
||||
orderBy(item1, item2);
|
||||
propertyDidChange(keyName: string): Ember.Observable;
|
||||
propertyWillChange(key: string): Ember.Observable;
|
||||
removeObject(obj: Object);
|
||||
removeObserver(key: string, target: Object, method: string): Ember.Observable;
|
||||
removeObserver(key: string, target: Object, method: Function): Ember.Observable;
|
||||
set(key: string, value: Object): Ember.Observable;
|
||||
setPath(path: string, value: Object): Ember.Observable;
|
||||
setProperties(hash): Ember.Observable;
|
||||
setUnknownProperty(key: string, value: Object);
|
||||
toggleProperty(keyName: string): Object;
|
||||
unknownProperty(key: string): Object;
|
||||
}
|
||||
}
|
||||
|
||||
interface EmberAlias {
|
||||
}
|
||||
|
||||
interface EmberArrayController {
|
||||
}
|
||||
|
||||
interface EmberBinding {
|
||||
}
|
||||
|
||||
interface EmberDescriptor {
|
||||
}
|
||||
|
||||
interface EmberNativeArray {
|
||||
activate(): void;
|
||||
}
|
||||
|
||||
interface EmberObject {
|
||||
}
|
||||
|
||||
interface EmberView {
|
||||
}
|
||||
|
||||
interface EmberStatic {
|
||||
|
||||
$; // jQuery
|
||||
A(arr?: any[]): EmberNativeArray;
|
||||
addListener(obj: any, eventName: string, targetOrMethod: any, method: any): void;
|
||||
alias(methodName: EmberDescriptor): EmberAlias;
|
||||
assert(desc: string, test: bool): void;
|
||||
beforeObserver(func: Function, propertyNames: string): Function;
|
||||
bind(obj: any, to: string, from: string): EmberBinding;
|
||||
cacheFor(obj: any, key: string): void;
|
||||
// Statics
|
||||
CP_DEFAULT_CACHEABLE: bool;
|
||||
ENV: Object;
|
||||
EXTEND_PROTOTYPES: bool;
|
||||
LOG_BINDINGS: bool;
|
||||
LOG_STACKTRACE_ON_DEPRECATION: bool;
|
||||
META_KEY: string;
|
||||
SHIM_ES5: bool;
|
||||
StringS: Object;
|
||||
VERSION: string;
|
||||
VIEW_PRESERVES_CONTEXT: bool;
|
||||
|
||||
Application: EmberApplication;
|
||||
Object: EmberObject;
|
||||
View: EmberView;
|
||||
Application: Ember.Application;
|
||||
View: Ember.View;
|
||||
|
||||
$; // jQuery
|
||||
|
||||
// API Doc Members
|
||||
A(arr: any[]): Ember.NativeArray;
|
||||
addBeforeObserver(obj: Object, path: string, target: Object, method: Function);
|
||||
addListener(obj: Object, eventName: string, target: Object, method: Function);
|
||||
addObserver(obj: Object, path: string, target: Object, method: Function);
|
||||
alias(methodName: string);
|
||||
assert(desc: string, test: bool);
|
||||
beforeObserver(func: Function);
|
||||
beginPropertyChanges();
|
||||
bind(obj: Object, to: string, from: string): Ember.Binding;
|
||||
cacheFor(obj: Object, key: string);
|
||||
canInvoke(obj: Object, methodName: string);
|
||||
changeProperties(cb: Function, binding?: Ember.Binding);
|
||||
compare(first: Object, second: Object): number;
|
||||
computed(func: Function): Ember.ComputedProperty;
|
||||
copy(obj: Object, deep: bool): Object;
|
||||
create(obj: Object, props: any);
|
||||
deferEvent(obj: Object, eventName: string, param: any);
|
||||
deprecate(message: string, test?: bool);
|
||||
deprecateFunc(message: string, func: Function);
|
||||
destroy(obj: Object): void;
|
||||
empty(obj: Object): bool;
|
||||
endPropertyChanges();
|
||||
finishChains(obj: Object);
|
||||
get(obj: Object, keyName: string): Object;
|
||||
getMeta(obj: Object, property: any);
|
||||
getWithDefault(root, key, defaultValue);
|
||||
hasListeners(obj: Object, eventName: string): bool;
|
||||
immediateObserver();
|
||||
inspect(obj: Object): string;
|
||||
isArray(obj?: any): bool;
|
||||
isEqual(a: Object, b: Object): bool;
|
||||
isGlobalPath(path: string): bool;
|
||||
isWatching(obj: Object, key): bool;
|
||||
keys(obj: Object): any[];
|
||||
listenersFor(obj: Object, eventName: string): any[];
|
||||
makeArray(obj: Object): any[];
|
||||
|
||||
Map();
|
||||
MapWithDefault(options);
|
||||
mixin(obj: Object);
|
||||
none(obj: Object): bool;
|
||||
observer(func: Function);
|
||||
oneWay(obj: Object, to, from);
|
||||
onLoad(name: string, callback: Function);
|
||||
|
||||
OrderedSet();
|
||||
overrideChains(obj: Object, keyName: string, m: any);
|
||||
propertyDidChange(obj: Object, keyName: string): void;
|
||||
propertyWillChange(obj: Object, keyName: string, value: any): void;
|
||||
removeBeforeObserver(obj, path, target, method);
|
||||
removeListener(obj, eventName, target, method);
|
||||
removeObserver(obj, path, target, method);
|
||||
|
||||
required();
|
||||
runLoadHooks(name: string, object: Object);
|
||||
sendEvent(obj: Object, eventName: string, params);
|
||||
set(obj: Object, keyName: string, value, tolerant);
|
||||
setMeta(obj: Object, property, value);
|
||||
setProperties(self, hash);
|
||||
toString(): string;
|
||||
tryInvoke(obj: Object, methodName: string, args: any[]): bool;
|
||||
trySet(root, path, value);
|
||||
typeOf(item): string;
|
||||
warn(message: string, test: bool);
|
||||
watchedEvents(obj: Object);
|
||||
|
||||
// Other public members not listed in API Doc
|
||||
meta(obj, writable);
|
||||
metaPath(obj, path, writable);
|
||||
normalizeTuple(target, path);
|
||||
notifyBeforeObservers(obj: Object, keyName: string);
|
||||
notifyObservers(obj: Object, keyName: string);
|
||||
observersFor(obj: Object, path: string);
|
||||
rewatch(obj: Object);
|
||||
run(target, method);
|
||||
defineProperty(obj: Object, keyName: string, desc, data, meta);
|
||||
beforeObserversFor(obj: Object, path: string);
|
||||
generateGuid(obj: Object, prefix);
|
||||
getPath();
|
||||
guidFor(obj: Object);
|
||||
identifyNamespaces();
|
||||
setPath();
|
||||
trySetPath();
|
||||
unwatch(obj: Object, keyName: string);
|
||||
watch(obj: Object, keyName: string);
|
||||
wrap(func: Function, superFunc: Function);
|
||||
}
|
||||
|
||||
declare var Em: EmberStatic;
|
||||
declare var Ember: EmberStatic;
|
||||
declare var Em: Ember;
|
||||
//declare var Ember: EmberStatic;
|
||||
Vendored
-124
@@ -1,124 +0,0 @@
|
||||
///<reference path='node.d.ts' />
|
||||
|
||||
declare module "express" {
|
||||
export function createServer(): ExpressServer;
|
||||
export function static(path: string): any;
|
||||
import http = module("http");
|
||||
export var listen;
|
||||
|
||||
// Connect middleware
|
||||
export function bodyParser(options?:any): (req: ExpressServerRequest, res: ExpressServerResponse, next) =>void;
|
||||
export function errorHandler(opts?:any): (req: ExpressServerRequest, res: ExpressServerResponse, next) =>void;
|
||||
export function methodOverride(): (req: ExpressServerRequest, res: ExpressServerResponse, next) =>void;
|
||||
|
||||
export interface ExpressSettings {
|
||||
env?: string;
|
||||
views?: string;
|
||||
}
|
||||
|
||||
export interface ExpressServer {
|
||||
set(name: string): any;
|
||||
set(name: string, val: any): any;
|
||||
enable(name: string): ExpressServer;
|
||||
disable(name: string): ExpressServer;
|
||||
enabled(name: string): bool;
|
||||
disabled(name: string): bool;
|
||||
configure(env: string, callback: () => void): ExpressServer;
|
||||
configure(env: string, env2: string, callback: () => void ): ExpressServer;
|
||||
configure(callback: () => void): ExpressServer;
|
||||
settings: ExpressSettings;
|
||||
engine(ext: string, callback: any): void;
|
||||
param(param: Function): ExpressServer;
|
||||
param(name: string, callback: Function): ExpressServer;
|
||||
param(name: string, expressParam: any): ExpressServer;
|
||||
param(name: any[], callback: Function): ExpressServer;
|
||||
get(name: string): any;
|
||||
get(path: string, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
|
||||
get(path: RegExp, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
|
||||
get(path: string, callbacks: any, callback: () => void ): void;
|
||||
post(path: string, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
|
||||
post(path: RegExp, handler: (req: ExpressServerRequest, res: ExpressServerResponse) => void ): void;
|
||||
post(path: string, callbacks: any, callback: () => void ): void;
|
||||
all(path: string, callback: Function): void;
|
||||
all(path: string, callback: Function, callback2: Function): void;
|
||||
locals: any;
|
||||
render(view: string, callback: (err: Error, html) => void ): void;
|
||||
render(view: string, opts: any, callback: (err: Error, html) => void ): void;
|
||||
routes: any;
|
||||
listen(port: number, hostname: string, backlog: number, callback: Function): void;
|
||||
listen(port: number, callback: Function): void;
|
||||
listen(path: string, callback?: Function): void;
|
||||
listen(handle: any, listeningListener?: Function): void;
|
||||
use(route: string, callback: Function): ExpressServer;
|
||||
use(route: string, server: ExpressServer): ExpressServer;
|
||||
use(callback: Function): ExpressServer;
|
||||
use(server: ExpressServer): ExpressServer;
|
||||
}
|
||||
|
||||
export interface ExpressServerRequest extends http.ServerRequest {
|
||||
params: any;
|
||||
query: any;
|
||||
body: any;
|
||||
files: any;
|
||||
param(name: string): any;
|
||||
route: any;
|
||||
cookies: any;
|
||||
signedCookies: any;
|
||||
get(field: string): string;
|
||||
accepts(types: string): any;
|
||||
accepts(types: string[]): any;
|
||||
accepted: any;
|
||||
is(type: string): bool;
|
||||
ip: string;
|
||||
ips: string[];
|
||||
path: string;
|
||||
host: string;
|
||||
fresh: bool;
|
||||
stale: bool;
|
||||
xhr: bool;
|
||||
protocol: string;
|
||||
secure: bool;
|
||||
subdomains: string[];
|
||||
acceptedLanguages: string[];
|
||||
acceptedCharsets: string[];
|
||||
acceptsCharset(charset: string): bool;
|
||||
acceptsLanguage(lang: string): bool;
|
||||
}
|
||||
|
||||
export interface ExpressServerResponse extends http.ServerResponse {
|
||||
status(code: number): any;
|
||||
set(field: any): void;
|
||||
set(field: string, value: string): void;
|
||||
header(field: any): void;
|
||||
header(field: string, value: string): void;
|
||||
get(field: string): any;
|
||||
cookie(name: string, value: any, options?: any): void;
|
||||
clearcookie(name: string, options?: any): void;
|
||||
redirect(status: number, url: string): void;
|
||||
redirect(url: string): void;
|
||||
charset: string;
|
||||
send(bodyOrStatus: any);
|
||||
send(body: any, status: any);
|
||||
send(body: any, headers: any, status: number);
|
||||
json(bodyOrStatus: any);
|
||||
json(body: any, status: any);
|
||||
json(body: any, headers: any, status: number);
|
||||
jsonp(bodyOrStatus: any);
|
||||
jsonp(body: any, status: any);
|
||||
jsonp(body: any, headers: any, status: number);
|
||||
type(type: string): void;
|
||||
format(object: any): void;
|
||||
attachment(filename?: string);
|
||||
sendfile(path: string): void;
|
||||
sendfile(path: string, options: any): void;
|
||||
sendfile(path: string, options: any, fn: (err: Error) =>void ): void;
|
||||
download(path: string): void;
|
||||
download(path: string, filename: string): void;
|
||||
download(path: string, filename: string, fn: (err: Error) =>void ): void;
|
||||
links(links: any): void;
|
||||
locals: any;
|
||||
render(view: string, locals: any): void;
|
||||
render(view: string, callback: (err: Error, html: any) =>void ): void;
|
||||
render(view: string, locals: any, callback: (err: Error, html: any) =>void ): void;
|
||||
}
|
||||
}
|
||||
Vendored
+188
@@ -0,0 +1,188 @@
|
||||
// Type definitions for Express 3.0
|
||||
// Project: http://expressjs.com
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
///<reference path='node-0.8.d.ts' />
|
||||
|
||||
declare module "express" {
|
||||
export function createServer(): ServerApplication;
|
||||
export function static(path: string): any;
|
||||
import http = module("http");
|
||||
export var listen;
|
||||
|
||||
interface ReqResNext {
|
||||
(req: ServerRequest, res: ServerResponse, next: Function): void;
|
||||
}
|
||||
|
||||
interface Errback { (err: Error): void; }
|
||||
|
||||
interface CookieOptions {
|
||||
maxAge?: number;
|
||||
signed?: bool;
|
||||
expires?: Date;
|
||||
httpOnly?: bool;
|
||||
path?: string;
|
||||
domain?: string;
|
||||
secure?: bool;
|
||||
}
|
||||
|
||||
// Connect middleware
|
||||
export function bodyParser(options?: any): ReqResNext;
|
||||
export function errorHandler(opts?: any): ReqResNext;
|
||||
export function methodOverride(): ReqResNext;
|
||||
|
||||
export interface ExpressSettings {
|
||||
env?: string;
|
||||
views?: string;
|
||||
}
|
||||
|
||||
export interface ServerApplication {
|
||||
|
||||
settings: ExpressSettings;
|
||||
locals: any;
|
||||
routes: any;
|
||||
|
||||
(): ServerApplication;
|
||||
|
||||
router: ReqResNext;
|
||||
|
||||
use(route: string, callback: Function): ServerApplication;
|
||||
use(route: string, server: ServerApplication): ServerApplication;
|
||||
use(callback: Function): ServerApplication;
|
||||
use(server: ServerApplication): ServerApplication;
|
||||
|
||||
engine(ext: string, callback: Function): ServerApplication;
|
||||
|
||||
param(param: Function): ServerApplication;
|
||||
param(name: string, callback: Function): ServerApplication;
|
||||
param(name: string, expressParam: any): ServerApplication;
|
||||
param(name: any[], callback: Function): ServerApplication;
|
||||
|
||||
set(name: string): ServerApplication;
|
||||
set(name: string, val: any): ServerApplication;
|
||||
|
||||
enabled(name: string): bool;
|
||||
disabled(name: string): bool;
|
||||
|
||||
enable(name: string): ServerApplication;
|
||||
disable(name: string): ServerApplication;
|
||||
|
||||
configure(env: string, callback: () => void ): ServerApplication;
|
||||
configure(...params: any[]): ServerApplication; // covering this case: (...env: string[], callback: () => void)
|
||||
configure(callback: () => void ): ServerApplication;
|
||||
|
||||
all(path: string, ...callbacks: Function[]): void;
|
||||
|
||||
render(view: string, callback: (err: Error, html) => void ): void;
|
||||
render(view: string, optionss: any, callback: (err: Error, html) => void ): void;
|
||||
|
||||
listen(port: number, hostname: string, backlog: number, callback: Function): void;
|
||||
listen(port: number, callback: Function): void;
|
||||
listen(path: string, callback?: Function): void;
|
||||
listen(handle: any, listeningListener?: Function): void;
|
||||
|
||||
get(name: string): any;
|
||||
get(path: string, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
|
||||
get(path: RegExp, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
|
||||
get(path: string, callbacks: any, callback: () => void ): void;
|
||||
|
||||
post(path: string, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
|
||||
post(path: RegExp, handler: (req: ServerRequest, res: ServerResponse) => void ): void;
|
||||
post(path: string, callbacks: any, callback: () => void ): void;
|
||||
}
|
||||
|
||||
export interface ServerRequest extends http.ServerRequest {
|
||||
|
||||
accepted: any[];
|
||||
acceptedLanguages: string[];
|
||||
acceptedCharsets: string[];
|
||||
|
||||
params: any;
|
||||
query: any;
|
||||
body: any;
|
||||
files: any;
|
||||
|
||||
route: any;
|
||||
cookies: any;
|
||||
signedCookies: any;
|
||||
|
||||
get(field: string): string;
|
||||
header(field: string): string;
|
||||
|
||||
accepts(types: string): any;
|
||||
accepts(types: string[]): any;
|
||||
acceptsCharset(charset: string): bool;
|
||||
acceptsLanguage(lang: string): bool;
|
||||
|
||||
range(size: number): number[];
|
||||
|
||||
param(name: string, defaultValue?: any): string;
|
||||
is(type: string): bool;
|
||||
|
||||
protocol: string;
|
||||
secure: bool;
|
||||
ip: string;
|
||||
ips: string[];
|
||||
auth: any;
|
||||
subdomains: string[];
|
||||
path: string;
|
||||
host: string;
|
||||
fresh: bool;
|
||||
stale: bool;
|
||||
xhr: bool;
|
||||
}
|
||||
|
||||
export interface ServerResponse extends http.ServerResponse {
|
||||
|
||||
charset: string;
|
||||
locals: any;
|
||||
|
||||
status(code: number): ServerResponse;
|
||||
links(links: any): ServerResponse;
|
||||
|
||||
send(status: number): ServerResponse;
|
||||
send(bodyOrStatus: any): ServerResponse;
|
||||
send(status: number, body: any): ServerResponse;
|
||||
json(status: number): ServerResponse;
|
||||
json(bodyOrStatus: any): ServerResponse;
|
||||
json(status: number, body: any): ServerResponse;
|
||||
jsonp(status: number): ServerResponse;
|
||||
jsonp(bodyOrStatus: any): ServerResponse;
|
||||
jsonp(status: number, body: any): ServerResponse;
|
||||
|
||||
sendfile(path: string): void;
|
||||
sendfile(path: string, options: any): void;
|
||||
sendfile(path: string, fn: Errback): void;
|
||||
sendfile(path: string, options: any, fn: Errback): void;
|
||||
download(path: string): void;
|
||||
download(path: string, filename: string): void;
|
||||
download(path: string, fn: Errback): void;
|
||||
download(path: string, filename: string, fn: Errback): void;
|
||||
|
||||
type(type: string): ServerResponse;
|
||||
contentType(type: string): ServerResponse;
|
||||
|
||||
format(object: any): ServerResponse;
|
||||
attachment(filename?: string): ServerResponse;
|
||||
|
||||
set(field: any): void;
|
||||
set(field: string, value: string): void;
|
||||
header(field: any): void;
|
||||
header(field: string, value: string): void;
|
||||
|
||||
get(field: string): string;
|
||||
|
||||
clearCookie(name: string, options?: any): ServerResponse;
|
||||
cookie(name: string, value: any, options?: CookieOptions): ServerResponse;
|
||||
|
||||
redirect(url: string): void;
|
||||
redirect(status: number, url: string): void;
|
||||
redirect(url: string, status: number): void;
|
||||
|
||||
render(view: string, options: any): void;
|
||||
render(view: string, callback: (err: Error, html: any) => void ): void;
|
||||
render(view: string, options: any, callback: (err: Error, html: any) => void ): void;
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// Type definitions for fancyBox 2.1
|
||||
// Project: https://github.com/fancyapps/fancyBox
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
|
||||
Vendored
+50
-47
@@ -1,42 +1,45 @@
|
||||
// Type definitions for Globalize
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
// Project: https://github.com/jquery/globalize
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface GlobalizePercent {
|
||||
pattern: string[];
|
||||
decimals: number;
|
||||
groupSizes: number[];
|
||||
//",": string;
|
||||
//".": string;
|
||||
pattern: string[];
|
||||
decimals: number;
|
||||
groupSizes: number[];
|
||||
//",": string;
|
||||
//".": string;
|
||||
symbol: string;
|
||||
}
|
||||
|
||||
interface GlobalizeCurrency {
|
||||
pattern: string[];
|
||||
decimals: number;
|
||||
groupSizes: number[];
|
||||
//",": string;
|
||||
//".": string;
|
||||
pattern: string[];
|
||||
decimals: number;
|
||||
groupSizes: number[];
|
||||
//",": string;
|
||||
//".": string;
|
||||
symbol: string;
|
||||
}
|
||||
|
||||
interface GlobalizeNumberFormat {
|
||||
pattern: string[];
|
||||
decimals: string;
|
||||
//",": string;
|
||||
//".": string;
|
||||
groupSizes: number[];
|
||||
//"+": string;
|
||||
//"-": string;
|
||||
NaN: string;
|
||||
negativeInfinity: string;
|
||||
positiveInfinity: string;
|
||||
percent: GlobalizePercent;
|
||||
pattern: string[];
|
||||
decimals: string;
|
||||
//",": string;
|
||||
//".": string;
|
||||
groupSizes: number[];
|
||||
//"+": string;
|
||||
//"-": string;
|
||||
NaN: string;
|
||||
negativeInfinity: string;
|
||||
positiveInfinity: string;
|
||||
percent: GlobalizePercent;
|
||||
currency: GlobalizeCurrency;
|
||||
}
|
||||
|
||||
interface GlobalizeEra {
|
||||
name: string;
|
||||
start: any;
|
||||
name: string;
|
||||
start: any;
|
||||
offset: number;
|
||||
}
|
||||
|
||||
@@ -47,28 +50,28 @@ interface GlobalizeDays {
|
||||
}
|
||||
|
||||
interface GlobalizePatterns {
|
||||
d: string;
|
||||
D: string;
|
||||
t: string;
|
||||
T: string;
|
||||
f: string;
|
||||
F: string;
|
||||
M: string;
|
||||
Y: string;
|
||||
d: string;
|
||||
D: string;
|
||||
t: string;
|
||||
T: string;
|
||||
f: string;
|
||||
F: string;
|
||||
M: string;
|
||||
Y: string;
|
||||
S: string;
|
||||
}
|
||||
|
||||
interface GlobalizeCalendar {
|
||||
name: string;
|
||||
// "/": string,
|
||||
// ":": string,
|
||||
firstDay: number;
|
||||
days: GlobalizeDays;
|
||||
months: any[];
|
||||
AM: string[];
|
||||
PM: string[];
|
||||
eras: GlobalizeEra[];
|
||||
twoDigitYearMax: number;
|
||||
name: string;
|
||||
// "/": string,
|
||||
// ":": string,
|
||||
firstDay: number;
|
||||
days: GlobalizeDays;
|
||||
months: any[];
|
||||
AM: string[];
|
||||
PM: string[];
|
||||
eras: GlobalizeEra[];
|
||||
twoDigitYearMax: number;
|
||||
patterns: GlobalizePatterns;
|
||||
}
|
||||
|
||||
@@ -77,11 +80,11 @@ interface GlobalizeCalendars {
|
||||
}
|
||||
|
||||
interface GlobalizeCulture {
|
||||
name: string;
|
||||
englishName: string;
|
||||
nativeName: string;
|
||||
isRTL: bool;
|
||||
language: string;
|
||||
name: string;
|
||||
englishName: string;
|
||||
nativeName: string;
|
||||
isRTL: bool;
|
||||
language: string;
|
||||
numberFormat: GlobalizeNumberFormat;
|
||||
calendars: GlobalizeCalendars;
|
||||
messages: any;
|
||||
|
||||
Vendored
+1542
File diff suppressed because it is too large
Load Diff
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// Type definitions for Handlebars 1.0
|
||||
// Project: http://handlebarsjs.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface HandlebarsStatic {
|
||||
registerHelper(name: string, fn: Function, inverse?: bool): void;
|
||||
registerPartial(name: string, str): void;
|
||||
K();
|
||||
createFrame(object);
|
||||
|
||||
Exception(message: string): void;
|
||||
SafeString(str: string): void;
|
||||
|
||||
parse(string: string);
|
||||
print(ast);
|
||||
logger;
|
||||
log(level, str): void;
|
||||
compile(environment, options?, context?, asObject?);
|
||||
}
|
||||
|
||||
declare var Handlebars: HandlebarsStatic;
|
||||
Vendored
+2
@@ -1,7 +1,9 @@
|
||||
// Type definitions for History.js
|
||||
// Project: https://github.com/balupton/History.js
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface HistoryAdapter {
|
||||
bind(element, event, callback);
|
||||
trigger(element, event);
|
||||
|
||||
Vendored
+1
@@ -3,6 +3,7 @@
|
||||
// Definitions by: https://github.com/jmvrbanac
|
||||
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface HumaneOptions {
|
||||
queue?: string[];
|
||||
baseCls?: string;
|
||||
|
||||
Vendored
+2
@@ -1,7 +1,9 @@
|
||||
// Type definitions for Impress.js 0.5
|
||||
// Project: https://github.com/bartaz/impress.js
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface Impress {
|
||||
init(): void;
|
||||
getStep(step: any): any;
|
||||
|
||||
Vendored
+267
-220
@@ -1,247 +1,294 @@
|
||||
// Type definitions for Jasmine 1.2
|
||||
// Project: http://pivotal.github.com/jasmine/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare function describe(description: string, specDefinitions: Function): JasmineEnv;
|
||||
declare function xdescribe(description: string, specDefinitions: Function): JasmineEnv;
|
||||
|
||||
declare function it(expectation: string, assertion: Function);
|
||||
declare function xit(expectation: string, assertion: Function);
|
||||
declare function describe(description: string, specDefinitions: Function): void;
|
||||
declare function xdescribe(description: string, specDefinitions: Function): void;
|
||||
|
||||
declare function beforeEach(action: Function);
|
||||
declare function afterEach(action: Function);
|
||||
declare function it(expectation: string, assertion: Function): void;
|
||||
declare function xit(expectation: string, assertion: Function): void;
|
||||
|
||||
declare function expect(spy: Function): JasmineSpyMatchers;
|
||||
declare function expect(spy: JasmineSpy): JasmineSpyMatchers;
|
||||
declare function expect(actual: any): JasmineMatchers;
|
||||
declare function beforeEach(action: Function): void;
|
||||
declare function afterEach(action: Function): void;
|
||||
|
||||
declare function spyOn(object: any, method: string): JasmineSpyOn;
|
||||
declare function expect(spy: Function): jasmine.Matchers;
|
||||
//declare function expect(spy: jasmine.Spy): jasmine.Matchers;
|
||||
declare function expect(actual: any): jasmine.Matchers;
|
||||
|
||||
declare function runs(asyncMethod: Function);
|
||||
declare function waitsFor(latchMethod: () => bool, failureMessage: string, timeout: number);
|
||||
declare function spyOn(object: any, method: string): jasmine.Spy;
|
||||
|
||||
interface JasmineAny {
|
||||
constructor (expectedClass);
|
||||
jasmineMatches(other);
|
||||
jasmineToString();
|
||||
}
|
||||
|
||||
interface JasmineBlock {
|
||||
constructor (env: JasmineEnv, func: Function, spec: JasmineSpec);
|
||||
execute(onComplete);
|
||||
}
|
||||
|
||||
interface JasmineClock {
|
||||
reset(): void;
|
||||
tick(millis): void;
|
||||
runFunctionsWithinRange(oldMillis, nowMillis): void;
|
||||
scheduleFunction(timeoutKey, funcToCall, millis, recurring): void;
|
||||
useMock(): void;
|
||||
installMock(): void;
|
||||
uninstallMock(): void;
|
||||
real;
|
||||
assertInstalled(): void;
|
||||
isInstalled(): bool;
|
||||
installed: any;
|
||||
};
|
||||
|
||||
interface JasmineEnv {
|
||||
setTimeout;
|
||||
clearTimeout;
|
||||
setInterval;
|
||||
clearInterval;
|
||||
|
||||
version();
|
||||
versionString(): string;
|
||||
nextSpecId(): number;
|
||||
addReporter(reporter);
|
||||
execute();
|
||||
describe(description, specDefinitions);
|
||||
beforeEach(beforeEachFunction);
|
||||
currentRunner();
|
||||
afterEach(afterEachFunction);
|
||||
xdescribe(desc, specDefinitions);
|
||||
it(description, func);
|
||||
xit(desc, func);
|
||||
compareObjects_(a, b, mismatchKeys, mismatchValues);
|
||||
equals_(a, b, mismatchKeys, mismatchValues);
|
||||
contains_(haystack, needle);
|
||||
addEqualityTester(equalityTester);
|
||||
}
|
||||
|
||||
interface JasmineFakeTimer {
|
||||
constructor ();
|
||||
reset(): void;
|
||||
tick(millis): void;
|
||||
runFunctionsWithinRange(oldMillis, nowMillis): void;
|
||||
scheduleFunction(timeoutKey, funcToCall, millis, recurring): void;
|
||||
}
|
||||
|
||||
interface JasmineHtmlReporter {
|
||||
constructor ();
|
||||
}
|
||||
|
||||
interface JasmineNestedResults {
|
||||
constructor ();
|
||||
rollupCounts(result);
|
||||
log(values);
|
||||
getItems();
|
||||
addResult(result);
|
||||
passed();
|
||||
}
|
||||
declare function runs(asyncMethod: Function): void;
|
||||
declare function waitsFor(latchMethod: () => bool, failureMessage: string, timeout?: number): void;
|
||||
declare function waits(timeout?: number): void;
|
||||
|
||||
|
||||
interface JasminePrettyPrinter {
|
||||
constructor ();
|
||||
format(value);
|
||||
iterateObject(obj, fn);
|
||||
emitScalar(value);
|
||||
emitString(value);
|
||||
emitArray(array);
|
||||
emitObject(obj);
|
||||
append(value);
|
||||
}
|
||||
declare module jasmine {
|
||||
|
||||
interface JasmineQueue {
|
||||
constructor (env);
|
||||
addBefore(block, ensure);
|
||||
add(block, ensure);
|
||||
insertNext(block, ensure);
|
||||
start(onComplete);
|
||||
isRunning();
|
||||
next_();
|
||||
results();
|
||||
}
|
||||
var Clock: Clock;
|
||||
|
||||
interface JasmineMatchers {
|
||||
constructor (env: JasmineEnv, actual, spec: JasmineEnv, isNot?: bool);
|
||||
wrapInto_(prototype, matchersClass);
|
||||
matcherFn_(matcherName, matcherFunction);
|
||||
toBe(expected);
|
||||
toNotBe(expected);
|
||||
toEqual(expected);
|
||||
toNotEqual(expected);
|
||||
toMatch(expected);
|
||||
toNotMatch(expected);
|
||||
toBeDefined();
|
||||
toBeUndefined();
|
||||
toBeNull();
|
||||
toBeNaN();
|
||||
toBeTruthy();
|
||||
toBeFalsy();
|
||||
toHaveBeenCalled();
|
||||
wasNotCalled();
|
||||
toHaveBeenCalledWith();
|
||||
toContain(expected);
|
||||
toNotContain(expected);
|
||||
toBeLessThan(expected);
|
||||
toBeGreaterThan(expected);
|
||||
toBeCloseTo(expected, precision);
|
||||
toThrow(expected);
|
||||
function any(aclass: any);
|
||||
function createSpy(name: string): any;
|
||||
function createSpyObj(baseName: string, methodNames: any[]): any;
|
||||
|
||||
Any: JasmineAny;
|
||||
}
|
||||
function getEnv(): Env;
|
||||
|
||||
interface JasmineMultiReporter {
|
||||
constructor ();
|
||||
addReporter(reporter: JasmineReporter);
|
||||
}
|
||||
interface Any {
|
||||
|
||||
interface JasmineReporter {
|
||||
constructor ();
|
||||
reportRunnerStarting(runner);
|
||||
reportRunnerResults(runner);
|
||||
reportSuiteResults(suite);
|
||||
reportSpecStarting(spec);
|
||||
reportSpecResults(spec);
|
||||
log(str);
|
||||
}
|
||||
new (expectedClass);
|
||||
|
||||
interface JasmineRunner {
|
||||
constructor (env: JasmineEnv);
|
||||
execute();
|
||||
beforeEach(beforeEachFunction);
|
||||
afterEach(afterEachFunction);
|
||||
finishCallback();
|
||||
addSuite(suite);
|
||||
add(block);
|
||||
specs();
|
||||
suites();
|
||||
topLevelSuites();
|
||||
results();
|
||||
}
|
||||
jasmineMatches(other);
|
||||
jasmineToString();
|
||||
}
|
||||
|
||||
interface JasmineSpec {
|
||||
constructor (env: JasmineEnv, suite: JasmineSuite, description: string);
|
||||
getFullName(): string;
|
||||
results();
|
||||
log();
|
||||
runs(func: Function);
|
||||
addToQueue(block);
|
||||
addMatcherResult(result);
|
||||
expect(actual);
|
||||
// waits(timeout: number); // deprecated
|
||||
waitsFor(latchFunction: Function, timeoutMessage?: string, timeout?: number);
|
||||
fail(e);
|
||||
getMatchersClass_();
|
||||
addMatchers(matchersPrototype);
|
||||
finishCallback();
|
||||
finish(onComplete);
|
||||
after(doAfter);
|
||||
execute(onComplete);
|
||||
addBeforesAndAftersToQueue();
|
||||
explodes();
|
||||
spyOn(obj, methodName, ignoreMethodDoesntExist);
|
||||
removeAllSpies();
|
||||
}
|
||||
interface Block {
|
||||
|
||||
new (env: Env, func: Function, spec: Spec);
|
||||
|
||||
execute(onComplete);
|
||||
}
|
||||
|
||||
interface Clock {
|
||||
reset(): void;
|
||||
tick(millis): void;
|
||||
runFunctionsWithinRange(oldMillis, nowMillis): void;
|
||||
scheduleFunction(timeoutKey, funcToCall, millis, recurring): void;
|
||||
useMock(): void;
|
||||
installMock(): void;
|
||||
uninstallMock(): void;
|
||||
real;
|
||||
assertInstalled(): void;
|
||||
isInstalled(): bool;
|
||||
installed: any;
|
||||
};
|
||||
|
||||
interface Env {
|
||||
setTimeout;
|
||||
clearTimeout;
|
||||
setInterval;
|
||||
clearInterval;
|
||||
updateInterval;
|
||||
|
||||
version();
|
||||
versionString(): string;
|
||||
nextSpecId(): number;
|
||||
addReporter(reporter);
|
||||
execute();
|
||||
describe(description, specDefinitions);
|
||||
beforeEach(beforeEachFunction);
|
||||
currentRunner();
|
||||
afterEach(afterEachFunction);
|
||||
xdescribe(desc, specDefinitions);
|
||||
it(description, func);
|
||||
xit(desc, func);
|
||||
compareObjects_(a, b, mismatchKeys, mismatchValues);
|
||||
equals_(a, b, mismatchKeys, mismatchValues);
|
||||
contains_(haystack, needle);
|
||||
addEqualityTester(equalityTester);
|
||||
specFilter(spec): bool;
|
||||
}
|
||||
|
||||
interface FakeTimer {
|
||||
|
||||
new ();
|
||||
|
||||
reset(): void;
|
||||
tick(millis): void;
|
||||
runFunctionsWithinRange(oldMillis, nowMillis): void;
|
||||
scheduleFunction(timeoutKey, funcToCall, millis, recurring): void;
|
||||
}
|
||||
|
||||
interface HtmlReporter {
|
||||
new ();
|
||||
}
|
||||
|
||||
interface NestedResults {
|
||||
|
||||
new ();
|
||||
|
||||
rollupCounts(result);
|
||||
log(values);
|
||||
getItems();
|
||||
addResult(result);
|
||||
passed();
|
||||
}
|
||||
|
||||
|
||||
interface JasmineSuite {
|
||||
constructor (env: JasmineEnv, description: string, specDefinitions: Function, parentSuite: JasmineSuite);
|
||||
interface PrettyPrinter {
|
||||
|
||||
getFullName();
|
||||
finish(onComplete);
|
||||
beforeEach(beforeEachFunction);
|
||||
afterEach(afterEachFunction);
|
||||
results();
|
||||
add(suiteOrSpec);
|
||||
specs();
|
||||
suites();
|
||||
children();
|
||||
execute(onComplete);
|
||||
}
|
||||
new ();
|
||||
|
||||
interface JasmineUtil {
|
||||
inherit(childClass: Function, parentClass: Function);
|
||||
formatException(e);
|
||||
htmlEscape(str: string): string;
|
||||
argsToArray(args);
|
||||
extend(destination, source);
|
||||
}
|
||||
format(value);
|
||||
iterateObject(obj, fn);
|
||||
emitScalar(value);
|
||||
emitString(value);
|
||||
emitArray(array);
|
||||
emitObject(obj);
|
||||
append(value);
|
||||
}
|
||||
|
||||
interface JsApiReporter {
|
||||
result;
|
||||
messages;
|
||||
interface Queue {
|
||||
|
||||
constructor ();
|
||||
reportRunnerStarting(runner);
|
||||
suites();
|
||||
summarize_(suiteOrSpec);
|
||||
results();
|
||||
resultsForSpec(specId);
|
||||
reportRunnerResults(runner);
|
||||
reportSuiteResults(suite);
|
||||
reportSpecResults(spec);
|
||||
log(str);
|
||||
resultsForSpecs(specIds);
|
||||
summarizeResult_(result);
|
||||
}
|
||||
new (env);
|
||||
|
||||
interface Jasmine {
|
||||
Spec: JasmineSpec;
|
||||
Clock: JasmineClock;
|
||||
HtmlReporter: JasmineHtmlReporter;
|
||||
util: JasmineUtil;
|
||||
}
|
||||
addBefore(block, ensure);
|
||||
add(block, ensure);
|
||||
insertNext(block, ensure);
|
||||
start(onComplete);
|
||||
isRunning();
|
||||
next_();
|
||||
results();
|
||||
}
|
||||
|
||||
declare var jasmine: Jasmine;
|
||||
interface Matchers {
|
||||
|
||||
new (env: Env, actual, spec: Env, isNot?: bool);
|
||||
|
||||
toBe(expected): bool;
|
||||
toNotBe(expected): bool;
|
||||
toEqual(expected): bool;
|
||||
toNotEqual(expected): bool;
|
||||
toMatch(expected): bool;
|
||||
toNotMatch(expected): bool;
|
||||
toBeDefined(): bool;
|
||||
toBeUndefined(): bool;
|
||||
toBeNull(): bool;
|
||||
toBeNaN(): bool;
|
||||
toBeTruthy(): bool;
|
||||
toBeFalsy(): bool;
|
||||
toHaveBeenCalled(): bool;
|
||||
wasNotCalled(): bool;
|
||||
toHaveBeenCalledWith(...params: any[]): bool;
|
||||
toContain(expected): bool;
|
||||
toNotContain(expected): bool;
|
||||
toBeLessThan(expected): bool;
|
||||
toBeGreaterThan(expected): bool;
|
||||
toBeCloseTo(expected, precision): bool;
|
||||
toThrow(expected? ): bool;
|
||||
not: Matchers;
|
||||
|
||||
Any: Any;
|
||||
}
|
||||
|
||||
interface MultiReporter {
|
||||
|
||||
new ();
|
||||
|
||||
addReporter(reporter: Reporter);
|
||||
}
|
||||
|
||||
interface Reporter {
|
||||
new ();
|
||||
reportRunnerStarting(runner);
|
||||
reportRunnerResults(runner);
|
||||
reportSuiteResults(suite);
|
||||
reportSpecStarting(spec);
|
||||
reportSpecResults(spec);
|
||||
log(str);
|
||||
}
|
||||
|
||||
interface Runner {
|
||||
|
||||
new (env: Env);
|
||||
|
||||
execute();
|
||||
beforeEach(beforeEachFunction);
|
||||
afterEach(afterEachFunction);
|
||||
finishCallback();
|
||||
addSuite(suite);
|
||||
add(block);
|
||||
specs();
|
||||
suites();
|
||||
topLevelSuites();
|
||||
results();
|
||||
}
|
||||
|
||||
interface Spec {
|
||||
|
||||
new (env: Env, suite: Suite, description: string);
|
||||
|
||||
getFullName(): string;
|
||||
results();
|
||||
log();
|
||||
runs(func: Function);
|
||||
addToQueue(block);
|
||||
addMatcherResult(result);
|
||||
expect(actual);
|
||||
waitsFor(latchFunction: Function, timeoutMessage?: string, timeout?: number);
|
||||
fail(e);
|
||||
getMatchersClass_();
|
||||
addMatchers(matchersPrototype);
|
||||
finishCallback();
|
||||
finish(onComplete);
|
||||
after(doAfter);
|
||||
execute(onComplete);
|
||||
addBeforesAndAftersToQueue();
|
||||
explodes();
|
||||
spyOn(obj, methodName, ignoreMethodDoesntExist);
|
||||
removeAllSpies();
|
||||
}
|
||||
|
||||
interface Spy {
|
||||
identity: string;
|
||||
calls: any[];
|
||||
mostRecentCall: { args: any[]; };
|
||||
argsForCall: any[];
|
||||
wasCalled: bool;
|
||||
callCount: number;
|
||||
|
||||
andReturn(value): void;
|
||||
andCallThrough(): void;
|
||||
andCallFake(fakeFunc: Function): void;
|
||||
}
|
||||
|
||||
interface Suite {
|
||||
|
||||
new (env: Env, description: string, specDefinitions: Function, parentSuite: Suite);
|
||||
|
||||
getFullName();
|
||||
finish(onComplete);
|
||||
beforeEach(beforeEachFunction);
|
||||
afterEach(afterEachFunction);
|
||||
results();
|
||||
add(suiteOrSpec);
|
||||
specs();
|
||||
suites();
|
||||
children();
|
||||
execute(onComplete);
|
||||
}
|
||||
|
||||
interface Util {
|
||||
inherit(childClass: Function, parentClass: Function);
|
||||
formatException(e);
|
||||
htmlEscape(str: string): string;
|
||||
argsToArray(args);
|
||||
extend(destination, source);
|
||||
}
|
||||
|
||||
interface JsApiReporter {
|
||||
|
||||
result;
|
||||
messages;
|
||||
|
||||
new ();
|
||||
|
||||
reportRunnerStarting(runner);
|
||||
suites();
|
||||
summarize_(suiteOrSpec);
|
||||
results();
|
||||
resultsForSpec(specId);
|
||||
reportRunnerResults(runner);
|
||||
reportSuiteResults(suite);
|
||||
reportSpecResults(spec);
|
||||
log(str);
|
||||
resultsForSpecs(specIds);
|
||||
summarizeResult_(result);
|
||||
}
|
||||
|
||||
interface Jasmine {
|
||||
Spec: Spec;
|
||||
Clock: Clock;
|
||||
util: Util;
|
||||
}
|
||||
}
|
||||
Vendored
+30
-17
@@ -57,8 +57,8 @@ interface JQueryAjaxSettings {
|
||||
/*
|
||||
Interface for the jqXHR object
|
||||
*/
|
||||
interface JQueryXHR extends XMLHttpRequest {
|
||||
overrideMimeType();
|
||||
interface JQueryXHR extends XMLHttpRequest, JQueryPromise {
|
||||
overrideMimeType(mimeType: string);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -74,7 +74,7 @@ interface JQueryCallback {
|
||||
has(callback: any): bool;
|
||||
lock(): any;
|
||||
locked(): bool;
|
||||
removed(...callbacks: any[]): any;
|
||||
remove(...callbacks: any[]): any;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -97,6 +97,7 @@ interface JQueryDeferred extends JQueryPromise {
|
||||
|
||||
pipe(doneFilter?: any, failFilter?: any, progressFilter?: any): JQueryPromise;
|
||||
progress(...progressCallbacks: any[]): JQueryDeferred;
|
||||
promise(target? ): JQueryDeferred;
|
||||
reject(...args: any[]): JQueryDeferred;
|
||||
rejectWith(context:any, ...args: any[]): JQueryDeferred;
|
||||
resolve(...args: any[]): JQueryDeferred;
|
||||
@@ -134,6 +135,7 @@ interface JQueryBrowserInfo {
|
||||
opera:bool;
|
||||
msie:bool;
|
||||
mozilla:bool;
|
||||
webkit:bool;
|
||||
version:string;
|
||||
}
|
||||
|
||||
@@ -167,12 +169,14 @@ interface JQueryStatic {
|
||||
/****
|
||||
AJAX
|
||||
*****/
|
||||
ajax(settings: JQueryAjaxSettings);
|
||||
ajax(url: string, settings: JQueryAjaxSettings);
|
||||
ajax(settings: JQueryAjaxSettings): JQueryXHR;
|
||||
ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
|
||||
|
||||
ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any;
|
||||
ajaxPrefilter(handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any;
|
||||
|
||||
ajaxSettings: JQueryAjaxSettings;
|
||||
|
||||
ajaxSetup(options: any);
|
||||
|
||||
get(url: string, data?: any, success?: any, dataType?: any): JQueryXHR;
|
||||
@@ -187,7 +191,7 @@ interface JQueryStatic {
|
||||
/*********
|
||||
CALLBACKS
|
||||
**********/
|
||||
Callbacks(flags: any): JQueryCallback;
|
||||
Callbacks(flags?: string): JQueryCallback;
|
||||
|
||||
/****
|
||||
CORE
|
||||
@@ -200,6 +204,7 @@ interface JQueryStatic {
|
||||
(elementArray: Element[]): JQuery;
|
||||
(object: JQuery): JQuery;
|
||||
(func: Function): JQuery;
|
||||
(array: any[]): JQuery;
|
||||
(): JQuery;
|
||||
|
||||
noConflict(removeAll?: bool): Object;
|
||||
@@ -212,11 +217,14 @@ interface JQueryStatic {
|
||||
css(e: any, propertyName: string, value?: any);
|
||||
css(e: any, propertyName: any, value?: any);
|
||||
cssHooks: { [key: string]: any; };
|
||||
cssNumber: any;
|
||||
|
||||
/****
|
||||
DATA
|
||||
*****/
|
||||
data(element: Element, key: string, value: any): Object;
|
||||
data(element: Element, key: string, value: any): any;
|
||||
data(element: Element, key: string): any;
|
||||
data(element: Element): any;
|
||||
|
||||
dequeue(element: Element, queueName?: string): any;
|
||||
|
||||
@@ -236,6 +244,7 @@ interface JQueryStatic {
|
||||
EVENTS
|
||||
*******/
|
||||
proxy(context: any, name: any): any;
|
||||
Deferred(): JQueryDeferred;
|
||||
|
||||
/*********
|
||||
INTERNALS
|
||||
@@ -311,11 +320,11 @@ interface JQuery {
|
||||
AJAX
|
||||
*****/
|
||||
ajaxComplete(handler: any): JQuery;
|
||||
ajaxError(handler: (evt: any, xhr: any, opts: any) => any): JQuery;
|
||||
ajaxSend(handler: (evt: any, xhr: any, opts: any) => any): JQuery;
|
||||
ajaxError(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery;
|
||||
ajaxSend(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery;
|
||||
ajaxStart(handler: () => any): JQuery;
|
||||
ajaxStop(handler: () => any): JQuery;
|
||||
ajaxSuccess(handler: (evt: any, xml: any, opts: any) => any): JQuery;
|
||||
ajaxSuccess(handler: (event: any, jqXHR: any, settings: any, exception: any) => any): JQuery;
|
||||
|
||||
load(url: string, data?: any, complete?: any): JQuery;
|
||||
|
||||
@@ -326,7 +335,7 @@ interface JQuery {
|
||||
ATTRIBUTES
|
||||
***********/
|
||||
addClass(classNames: string): JQuery;
|
||||
addClass(func: (index: any, currentClass: any) => JQuery);
|
||||
addClass(func: (index: any, currentClass: any) => string): JQuery;
|
||||
|
||||
attr(attributeName: string): string;
|
||||
attr(attributeName: string, value: any): JQuery;
|
||||
@@ -338,7 +347,7 @@ interface JQuery {
|
||||
html(htmlString: string): JQuery;
|
||||
html(): string;
|
||||
|
||||
prop(propertyName: string): string;
|
||||
prop(propertyName: string): bool;
|
||||
prop(propertyName: string, value: any): JQuery;
|
||||
prop(map: any): JQuery;
|
||||
prop(propertyName: string, func: (index: any, oldPropertyValue: any) => any): JQuery;
|
||||
@@ -362,11 +371,12 @@ interface JQuery {
|
||||
/***
|
||||
CSS
|
||||
****/
|
||||
css(propertyName: string, value?: any);
|
||||
css(propertyName: any, value?: any);
|
||||
css(propertyName: string, value?: any): any;
|
||||
css(propertyName: any, value?: any): any;
|
||||
|
||||
height(): number;
|
||||
height(value: number): JQuery;
|
||||
height(value: string): JQuery;
|
||||
height(func: (index: any, height: any) => any): JQuery;
|
||||
|
||||
innerHeight(): number;
|
||||
@@ -389,6 +399,7 @@ interface JQuery {
|
||||
|
||||
width(): number;
|
||||
width(value: number): JQuery;
|
||||
width(value: string): JQuery;
|
||||
width(func: (index: any, height: any) => any): JQuery;
|
||||
|
||||
/****
|
||||
@@ -412,6 +423,7 @@ interface JQuery {
|
||||
/*******
|
||||
EFFECTS
|
||||
********/
|
||||
animate(properties: any, duration?: any, complete?: Function): JQuery;
|
||||
animate(properties: any, duration?: any, easing?: string, complete?: Function): JQuery;
|
||||
animate(properties: any, options: { duration?: any; easing?: string; complete?: Function; step?: Function; queue?: bool; specialEasing?: any; });
|
||||
|
||||
@@ -595,9 +607,10 @@ interface JQuery {
|
||||
|
||||
replaceWith(func: any): JQuery;
|
||||
|
||||
text(textString: string): JQuery;
|
||||
text(): string;
|
||||
|
||||
text(textString: string): JQuery;
|
||||
text(textString: (index: number, text: string) => string): JQuery;
|
||||
|
||||
toArray(): any[];
|
||||
|
||||
unwrap(): JQuery;
|
||||
@@ -613,7 +626,7 @@ interface JQuery {
|
||||
/*************
|
||||
MISCELLANEOUS
|
||||
**************/
|
||||
each(func: (index: any, elem: Element) => JQuery);
|
||||
each(func: (index: any, elem: Element) => any);
|
||||
|
||||
get(index?: number): any;
|
||||
|
||||
|
||||
Vendored
+240
@@ -0,0 +1,240 @@
|
||||
// Type definitions for jquery.dynagrid 1.2
|
||||
// Project: http://code.google.com/p/dynatree/
|
||||
// Definitions by: https://github.com/fdecampredon
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface JQuery {
|
||||
dynatree(options?: DynatreeOptions): DynaTree;
|
||||
dynatree(option?: string, ...rest: any[]): any;
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
ui: {
|
||||
dynatree: DynatreeNamespace;
|
||||
};
|
||||
}
|
||||
|
||||
interface DynaTree {
|
||||
activateKey(key: string): DynaTreeNode;
|
||||
count(): number;
|
||||
enable(): void;
|
||||
disable(): void;
|
||||
enableUpdate(enable: bool): void;
|
||||
getActiveNode(): DynaTreeNode;
|
||||
getNodeByKey(key: string): DynaTreeNode;
|
||||
getPersistData(): any;
|
||||
getRoot(): DynaTreeNode;
|
||||
getSelectedNodes(stopOnParents: bool): DynaTreeNode[];
|
||||
initialize(): void;
|
||||
isInitializing(): bool;
|
||||
isReloading(): bool;
|
||||
isUserEvent(): bool;
|
||||
loadKeyPath(keyPath: string, callback: (node: DynaTreeNode, status: string) =>void ): void;
|
||||
reactivate(setFocus: bool): void;
|
||||
redraw(): void;
|
||||
reload(): void;
|
||||
renderInvisibleNodes(): void;
|
||||
selectKey(key: string, flag: string): DynaTreeNode;
|
||||
serializeArray(stopOnParents: bool): any[];
|
||||
toDict(): any;
|
||||
visit(fn: (node: DynaTreeNode) =>bool, includeRoot: bool): void;
|
||||
}
|
||||
|
||||
|
||||
interface DynaTreeNode {
|
||||
data: DynaTreeDataModel;
|
||||
activate(): void;
|
||||
activateSilently(): void;
|
||||
addChild(nodeData: DynaTreeDataModel, beforeNode?: DynaTreeNode): void;
|
||||
addChild(nodeData: DynaTreeDataModel[], beforeNode?: DynaTreeNode): void;
|
||||
appendAjax(ajaxOptions: JQueryAjaxSettings): void;
|
||||
countChildren(): number;
|
||||
deactivate(): void;
|
||||
expand(flag: string): void;
|
||||
focus(): void;
|
||||
getChildren(): DynaTreeNode[];
|
||||
getEventTargetType(event: Event): string;
|
||||
getLevel(): number;
|
||||
getNextSibling(): DynaTreeNode;
|
||||
getParent(): DynaTreeNode;
|
||||
getPrevSibling(): DynaTreeNode;
|
||||
hasChildren(): bool;
|
||||
isActive(): bool;
|
||||
isChildOf(otherNode: DynaTreeNode): bool;
|
||||
isDescendantOf(otherNode: DynaTreeNode): bool;
|
||||
isExpanded(): bool;
|
||||
isFirstSibling(): bool;
|
||||
isFocused(): bool;
|
||||
isLastSibling(): bool;
|
||||
isLazy(): bool;
|
||||
isLoading(): bool;
|
||||
isSelected(): bool;
|
||||
isStatusNode(): bool;
|
||||
isVisible(): bool;
|
||||
makeVisible(): bool;
|
||||
move(targetNode: DynaTreeNode, mode: string): bool;
|
||||
reload(force: bool): void;
|
||||
remove(): void;
|
||||
removeChildren(): void;
|
||||
render(useEffects: bool, includeInvisible: bool): void;
|
||||
resetLazy(): void;
|
||||
scheduleAction(mode: string, ms: number);
|
||||
select(flag: string): void;
|
||||
setLazyNodeStatus(status: number): void;
|
||||
setTitle(title: string): void;
|
||||
sortChildren(cmp?: (a: DynaTreeNode, b: DynaTreeNode) =>number, deep?: bool);
|
||||
toDict(recursive: bool, callback?: (node: any) =>any): any;
|
||||
toggleExpand(): void;
|
||||
toggleSelect(): void;
|
||||
visit(fn: (node: DynaTreeNode) =>bool, includeSelf: bool): void;
|
||||
visitParents(fn: (node: DynaTreeNode) =>bool, includeSelf: bool): void;
|
||||
}
|
||||
|
||||
interface DynatreeOptions {
|
||||
title?: string; // Tree's name (only used for debug outpu)
|
||||
minExpandLevel?: number; // 1: root node is not collapsible
|
||||
imagePath?: string; // Path to a folder containing icons. Defaults to 'skin/' subdirectory.
|
||||
children?: DynaTreeDataModel[]; // Init tree structure from this object array.
|
||||
initId?: string; // Init tree structure from a <ul> element with this ID.
|
||||
initAjax?: JQueryAjaxSettings; // Ajax options used to initialize the tree strucuture.
|
||||
autoFocus?: bool; // Set focus to first child, when expanding or lazy-loading.
|
||||
keyboard?: bool; // Support keyboard navigation.
|
||||
persist?: bool; // Persist expand-status to a cookie
|
||||
autoCollapse?: bool; // Automatically collapse all siblings, when a node is expanded.
|
||||
clickFolderMode?: number; // 1:activate, 2:expand, 3:activate and expand
|
||||
activeVisible?: bool; // Make sure, active nodes are visible (expanded).
|
||||
checkbox?: bool; // Show checkboxes.
|
||||
selectMode?: number; // 1:single, 2:multi, 3:multi-hier
|
||||
fx?: any; // Animations, e.g. null or { height: "toggle", duration: 200 }
|
||||
noLink?: bool; // Use <span> instead of <a> tags for all nodes
|
||||
debugLevel?: number; // 0:quiet, 1:normal, 2:debug
|
||||
generateIds?: bool; // Generate id attributes like <span id='dynatree-id-KEY'>
|
||||
idPrefix?: string; // Used to generate node id's like <span id="dynatree-id-<key>">.
|
||||
keyPathSeparator?: string; // Used by node.getKeyPath() and tree.loadKeyPath().
|
||||
cookieId?: string; // Choose a more unique name, to allow multiple trees.
|
||||
|
||||
dnd?: DynaTreeDNDOptions; // Drag'n'drop support
|
||||
ajaxDefaults?: DynaTreeAjaxOptions;// Used by initAjax option
|
||||
strings?: DynaTreeStringsOptions;
|
||||
cookie?: DynaTreeCookieOptions;
|
||||
// Class names used, when rendering the HTML markup.
|
||||
// Note: if only single entries are passed for options.classNames, all other
|
||||
// values are still set to default.
|
||||
classNames?: DynatreeClassNamesOptions;
|
||||
|
||||
|
||||
// Low level event handlers: onEvent(dtnode, event): return false, to stop default processing
|
||||
onClick?: (dtnode: DynaTreeNode, event: Event) =>bool; // null: generate focus, expand, activate, select events.
|
||||
onDblClick?: (dtnode: DynaTreeNode, event: Event) =>bool; // (No default actions.)
|
||||
onKeydown?: (dtnode: DynaTreeNode, event: Event) =>bool; // null: generate keyboard navigation (focus, expand, activate).
|
||||
onKeypress?: (dtnode: DynaTreeNode, event: Event) =>bool; // (No default actions.)
|
||||
onFocus?: (dtnode: DynaTreeNode, event: Event) =>bool; // null: set focus to node.
|
||||
onBlur?: (dtnode: DynaTreeNode, event: Event) =>bool; // null: remove focus from node.
|
||||
|
||||
// Pre-event handlers onQueryEvent(flag, dtnode): return false, to stop processing
|
||||
onQueryActivate?: (flag: string, dtnode: DynaTreeNode) =>void; // Callback(flag, dtnode) before a node is (de)activated.
|
||||
onQuerySelect?: (flag: string, dtnode: DynaTreeNode) =>void;// Callback(flag, dtnode) before a node is (de)selected.
|
||||
onQueryExpand?: (flag: string, dtnode: DynaTreeNode) =>void;// Callback(flag, dtnode) before a node is expanded/collpsed.
|
||||
|
||||
// High level event handlers
|
||||
onPostInit?: (isReloading: bool, isError: bool) =>void;// Callback(isReloading, isError) when tree was (re)loaded.
|
||||
onActivate?: (dtnode: DynaTreeNode) =>void; // Callback(dtnode) when a node is activated.
|
||||
onDeactivate?: (dtnode: DynaTreeNode) =>void; // Callback(dtnode) when a node is deactivated.
|
||||
onSelect?: (flag: string, dtnode: DynaTreeNode) =>void; // Callback(flag, dtnode) when a node is (de)selected.
|
||||
onExpand?: (flag: string, dtnode: DynaTreeNode) =>void; // Callback(flag, dtnode) when a node is expanded/collapsed.
|
||||
onLazyRead?: (dtnode: DynaTreeNode) =>void; // Callback(dtnode) when a lazy node is expanded for the first time.
|
||||
onCustomRender?: (dtnode: DynaTreeNode) =>void; // Callback(dtnode) before a node is rendered. Return a HTML string to override.
|
||||
onCreate?: (dtnode: DynaTreeNode, nodeSpan: any) =>void; // Callback(dtnode, nodeSpan) after a node was rendered for the first time.
|
||||
onRender?: (dtnode: DynaTreeNode, nodeSpan: any) =>void; // Callback(dtnode, nodeSpan) after a node was rendered.
|
||||
postProcess?: (data: any, dataType: any) =>void; // Callback(data, dataType) before an Ajax result is passed to dynatree.
|
||||
}
|
||||
|
||||
interface DynaTreeDataModel {
|
||||
title: string; // (required) Displayed name of the node (html is allowed here)
|
||||
key?: string; // May be used with activate(), select(), find(), ...
|
||||
isFolder?: bool; // Use a folder icon. Also the node is expandable but not selectable.
|
||||
isLazy?: bool; // Call onLazyRead(), when the node is expanded for the first time to allow for delayed creation of children.
|
||||
tooltip?: string; // Show this popup text.
|
||||
href?: string; // Added to the generated <a> tag.
|
||||
icon?: string; // Use a custom image (filename relative to tree.options.imagePath). 'null' for default icon, 'false' for no icon.
|
||||
addClass?: string; // Class name added to the node's span tag.
|
||||
noLink?: bool; // Use <span> instead of <a> tag for this node
|
||||
activate?: bool; // Initial active status.
|
||||
focus?: bool; // Initial focused status.
|
||||
expand?: bool; // Initial expanded status.
|
||||
select?: bool; // Initial selected status.
|
||||
hideCheckbox?: bool; // Suppress checkbox display for this node.
|
||||
unselectable?: bool; // Prevent selection.
|
||||
// The following attributes are only valid if passed to some functions:
|
||||
children?: DynaTreeDataModel[]; // Array of child nodes.
|
||||
// NOTE: we can also add custom attributes here.
|
||||
// This may then also be used in the onActivate(), onSelect() or onLazyTree() callbacks.
|
||||
}
|
||||
|
||||
interface DynaTreeDNDOptions {
|
||||
autoExpandMS?: number; // Expand nodes after n milliseconds of hovering.
|
||||
preventVoidMoves?: bool; // Prevent dropping nodes 'before self', etc.
|
||||
|
||||
|
||||
// Make tree nodes draggable:
|
||||
onDragStart?: (sourceNode: any) =>void; // Callback(sourceNode), return true, to enable dnd
|
||||
onDragStop?: (sourceNode: any) =>void; // Callback(sourceNode)
|
||||
// Make tree nodes accept draggables
|
||||
|
||||
onDragEnter?: (targetNode: any, sourceNode: any) =>void; // Callback(targetNode, sourceNode)
|
||||
onDragOver?: (targetNode: any, sourceNode: any, hitMode: string) =>void; // Callback(targetNode, sourceNode, hitMode)
|
||||
onDrop?: (targetNode: any, sourceNode: any, hitMode: string) =>void; // Callback(targetNode, sourceNode, hitMode)
|
||||
onDragLeave?: (targetNode: any, sourceNode: any) =>void; // Callback(targetNode, sourceNode)
|
||||
}
|
||||
|
||||
interface DynaTreeCookieOptions {
|
||||
expires: any;
|
||||
}
|
||||
|
||||
interface DynaTreeStringsOptions {
|
||||
loading?: string;
|
||||
loadError?: string;
|
||||
}
|
||||
|
||||
interface DynaTreeAjaxOptions {
|
||||
|
||||
cache?: bool; // false: Append random '_' argument to the request url to prevent caching.
|
||||
timeout?: number; // >0: Make sure we get an ajax error for invalid URLs
|
||||
dataType?: string; // Expect json format and pass json object to callbacks.
|
||||
}
|
||||
|
||||
interface DynatreeClassNamesOptions {
|
||||
container?: string;
|
||||
node?: string;
|
||||
folder?: string;
|
||||
|
||||
empty?: string;
|
||||
vline?: string;
|
||||
expander?: string;
|
||||
connector?: string;
|
||||
checkbox?: string;
|
||||
nodeIcon?: string;
|
||||
title?: string;
|
||||
noConnector?: string;
|
||||
|
||||
nodeError?: string;
|
||||
nodeWait?: string;
|
||||
hidden?: string;
|
||||
combinedExpanderPrefix?: string;
|
||||
combinedIconPrefix?: string;
|
||||
hasChildren?: string;
|
||||
active?: string;
|
||||
selected?: string;
|
||||
expanded?: string;
|
||||
lazy?: string;
|
||||
focused?: string;
|
||||
partsel?: string;
|
||||
lastsib?: string;
|
||||
}
|
||||
|
||||
interface DynatreeNamespace {
|
||||
getNode(element: HTMLElement): DynaTreeNode;
|
||||
getPersistData(cookieId: string, cookieOpts: DynaTreeCookieOptions): any;
|
||||
version: number;
|
||||
}
|
||||
Vendored
+381
@@ -0,0 +1,381 @@
|
||||
// Type definitions for jQuery Mobile 1.2
|
||||
// Project: http://jquerymobile.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="jquery-1.8.d.ts"/>
|
||||
|
||||
interface JQueryMobileEvent { (event: Event, ui): void; }
|
||||
|
||||
interface DialogOptions {
|
||||
closeBtnText?: string;
|
||||
initSelector?: string;
|
||||
overlayTheme?: string;
|
||||
}
|
||||
|
||||
interface DialogEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface PopupOptions {
|
||||
corners?: bool;
|
||||
history?: bool;
|
||||
initSelector?: string;
|
||||
overlayTheme?: string;
|
||||
positionTo?: string;
|
||||
shadow?: bool;
|
||||
theme?: string;
|
||||
tolerance?: string;
|
||||
transition?: string;
|
||||
}
|
||||
|
||||
interface PopupEvents {
|
||||
popupbeforeposition?: JQueryMobileEvent;
|
||||
popupafteropen?: JQueryMobileEvent;
|
||||
popupafterclose?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface FixedToolbarOptions {
|
||||
visibleOnPageShow?: bool;
|
||||
disablePageZoom?: bool;
|
||||
transition?: string;
|
||||
fullscreen?: bool;
|
||||
tapToggle?: bool;
|
||||
tapToggleBlacklist?: string;
|
||||
hideDuringFocus?: string;
|
||||
updatePagePadding?: bool;
|
||||
supportBlacklist?: Function;
|
||||
initSelector?: string;
|
||||
}
|
||||
|
||||
interface FixedToolbarEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface ButtonOptions {
|
||||
corners?: bool;
|
||||
icon?: string;
|
||||
iconpos?: string;
|
||||
iconshadow?: bool;
|
||||
inline?: bool;
|
||||
mini?: bool;
|
||||
shadow?: bool;
|
||||
theme?: string;
|
||||
initSelector?: string;
|
||||
}
|
||||
|
||||
interface ButtonEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface CollapsibleOptions {
|
||||
collapsed?: bool;
|
||||
collapseCueText?: string;
|
||||
collapsedIcon?: string;
|
||||
contentTheme?: string;
|
||||
expandCueText?: string;
|
||||
expandedIcon?: string;
|
||||
heading?: string;
|
||||
iconpos?: string;
|
||||
initSelector?: string;
|
||||
inset?: bool;
|
||||
mini?: bool;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface CollapsibleEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
collapse?: JQueryMobileEvent;
|
||||
expand?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface CollapsibleSetOptions {
|
||||
collapsedIcon?: string;
|
||||
expandedIcon?: string;
|
||||
iconpos?: string;
|
||||
initSelector?: string;
|
||||
inset?: bool;
|
||||
mini?: bool;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface CollapsibleSetEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface TextInputOptions {
|
||||
disabled?: bool;
|
||||
initSelector?: string;
|
||||
mini?: bool;
|
||||
preventFocusZoom?: bool;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface TextInputEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface SearchInputOptions {
|
||||
clearSearchButtonText?: string;
|
||||
disabled?: bool;
|
||||
initSelector?: string;
|
||||
mini?: bool;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface SliderOptions {
|
||||
disabled?: bool;
|
||||
highlight?: bool;
|
||||
initSelector?: string;
|
||||
mini?: bool;
|
||||
theme?: string;
|
||||
trackTheme?: string;
|
||||
}
|
||||
|
||||
interface SliderEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
slidestart?: JQueryMobileEvent;
|
||||
slidestop?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface CheckboxRadioOptions {
|
||||
mini?: bool;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface CheckboxRadioEvents {
|
||||
createp?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface SelectMenuOptions {
|
||||
corners?: bool;
|
||||
icon?: string;
|
||||
iconpos?: string;
|
||||
iconshadow?: bool;
|
||||
initSelector?: string;
|
||||
inline?: bool;
|
||||
mini?: bool;
|
||||
nativeMenu?: bool;
|
||||
overlayTheme?: string;
|
||||
preventFocusZoom?: bool;
|
||||
shadow?: bool;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface SelectMenuEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface ListViewOptions {
|
||||
countTheme?: string;
|
||||
dividerTheme?: string;
|
||||
filter?: bool;
|
||||
filterCallback?: Function;
|
||||
filterPlaceholder?: string;
|
||||
filterTheme?: string;
|
||||
headerTheme?: string;
|
||||
initSelector?: string;
|
||||
inset?: bool;
|
||||
splitIcon?: string;
|
||||
splitTheme?: string;
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
interface ListViewEvents {
|
||||
create?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface JQueryMobileOptions {
|
||||
activeBtnClass?: string;
|
||||
activePageClass?: string;
|
||||
ajaxEnabled?: bool;
|
||||
allowCrossDomainPages?: bool;
|
||||
autoInitializePage?: bool;
|
||||
buttonMarkup;
|
||||
defaultDialogTransition?: string;
|
||||
defaultPageTransition?: string;
|
||||
getMaxScrollForTransition?: number;
|
||||
gradeA?: Function;
|
||||
hashListeningEnabled?: bool;
|
||||
ignoreContentEnabled?: bool;
|
||||
linkBindingEnabled?: bool;
|
||||
loadingMessageTextVisible?: bool;
|
||||
loadingMessageTheme?: string;
|
||||
maxTransitionWidth?: number;
|
||||
minScrollBack?: number;
|
||||
ns?: number;
|
||||
pageLoadErrorMessage?: string;
|
||||
pageLoadErrorMessageTheme?: string;
|
||||
phonegapNavigationEnabled?: bool;
|
||||
pushStateEnabled?: bool;
|
||||
subPageUrlKey?: string;
|
||||
touchOverflowEnabled?: bool;
|
||||
transitionFallbacks;
|
||||
}
|
||||
|
||||
interface JQueryMobileEvents {
|
||||
tap;
|
||||
taphold;
|
||||
swipe;
|
||||
swipeleft;
|
||||
swiperight;
|
||||
|
||||
vmouseover;
|
||||
vmouseout;
|
||||
vmousedown;
|
||||
vmousemove;
|
||||
vmouseup;
|
||||
vclick;
|
||||
vmousecancel;
|
||||
|
||||
orientationchange;
|
||||
scrollstart;
|
||||
scrollstop;
|
||||
|
||||
pagebeforeload;
|
||||
pageload;
|
||||
pageloadfailed;
|
||||
pagebeforechange;
|
||||
pagechange;
|
||||
pagechangefailed;
|
||||
pagebeforeshow;
|
||||
pagebeforehide;
|
||||
pageshow;
|
||||
pagehide;
|
||||
pagebeforecreate;
|
||||
pagecreate;
|
||||
pageinit;
|
||||
pageremove;
|
||||
updatelayout;
|
||||
}
|
||||
|
||||
interface ChangePageOptions {
|
||||
allowSamePageTransition?: bool;
|
||||
changeHash?: bool;
|
||||
data?: any;
|
||||
dataUrl?: string;
|
||||
pageContainer?: JQuery;
|
||||
reloadPage?: bool;
|
||||
reverse?: bool;
|
||||
role?: string;
|
||||
showLoadMsg?: bool;
|
||||
transition?: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
interface LoadPageOptions {
|
||||
data?: any;
|
||||
loadMsgDelay?: number;
|
||||
pageContainer?: JQuery;
|
||||
reloadPage?: bool;
|
||||
role?: string;
|
||||
showLoadMsg?: bool;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
interface JQueryMobile extends JQueryMobileOptions {
|
||||
|
||||
changePage(to: any, options?: ChangePageOptions): void;
|
||||
loadPage(url: any, options?: LoadPageOptions): void;
|
||||
loading(command: string, options?): void;
|
||||
|
||||
base;
|
||||
silentScroll(yPos: number):void;
|
||||
activePage;
|
||||
|
||||
options: JQueryMobileOptions;
|
||||
|
||||
transitionFallbacks;
|
||||
loader;
|
||||
loading;
|
||||
loadPage;
|
||||
page;
|
||||
|
||||
silentScroll;
|
||||
touchOverflow;
|
||||
showCategory;
|
||||
path;
|
||||
|
||||
dialog;
|
||||
popup;
|
||||
fixedtoolbar;
|
||||
button;
|
||||
collapsible;
|
||||
collapsibleset;
|
||||
textinput;
|
||||
slider;
|
||||
checkboxradio;
|
||||
selectmenu;
|
||||
listview;
|
||||
}
|
||||
|
||||
interface JQuerySupport {
|
||||
touchOverflow;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
|
||||
dialog(): JQuery;
|
||||
dialog(command: string): JQuery;
|
||||
dialog(options: DialogOptions): JQuery;
|
||||
dialog(events: DialogEvents): JQuery;
|
||||
|
||||
popup(): JQuery;
|
||||
popup(command: string): JQuery;
|
||||
popup(options: PopupOptions): JQuery;
|
||||
popup(command: string, options: PopupOptions): JQuery;
|
||||
popup(events: PopupEvents): JQuery;
|
||||
|
||||
fixedtoolbar(): JQuery;
|
||||
fixedtoolbar(command: string): JQuery;
|
||||
fixedtoolbar(options: FixedToolbarOptions): JQuery;
|
||||
fixedtoolbar(events: FixedToolbarEvents): JQuery;
|
||||
|
||||
|
||||
button(): JQuery;
|
||||
button(command: string): JQuery;
|
||||
buttonMarkup(options: ButtonOptions): JQuery;
|
||||
button(events: ButtonEvents): JQuery;
|
||||
|
||||
collapsible(): JQuery;
|
||||
collapsible(command: string): JQuery;
|
||||
collapsible(options: CollapsibleOptions): JQuery;
|
||||
collapsible(events: CollapsibleEvents): JQuery;
|
||||
collapsibleSet(): JQuery;
|
||||
collapsibleSet(command: string): JQuery;
|
||||
collapsibleset(options: CollapsibleSetOptions): JQuery;
|
||||
collapsibleset(events: CollapsibleSetEvents): JQuery;
|
||||
|
||||
textinput(): JQuery;
|
||||
textinput(command: string): JQuery;
|
||||
textinput(options: TextInputOptions): JQuery;
|
||||
textinput(events: TextInputEvents): JQuery;
|
||||
textinput(options: SearchInputOptions): JQuery;
|
||||
|
||||
slider(): JQuery;
|
||||
slider(command: string): JQuery;
|
||||
slider(options: SliderOptions): JQuery;
|
||||
slider(events: SliderEvents): JQuery;
|
||||
|
||||
checkboxradio(): JQuery;
|
||||
checkboxradio(command: string): JQuery;
|
||||
checkboxradio(options: CheckboxRadioOptions): JQuery;
|
||||
checkboxradio(events: CheckboxRadioEvents): JQuery;
|
||||
|
||||
selectmenu(): JQuery;
|
||||
selectmenu(command: string): JQuery;
|
||||
selectmenu(command: string, update: bool): JQuery;
|
||||
selectmenu(options: CheckboxRadioOptions): JQuery;
|
||||
selectmenu(events: CheckboxRadioEvents): JQuery;
|
||||
|
||||
listview(): JQuery;
|
||||
listview(command: string): JQuery;
|
||||
listview(options: ListViewOptions): JQuery;
|
||||
listview(events: ListViewEvents): JQuery;
|
||||
}
|
||||
|
||||
|
||||
interface JQueryStatic {
|
||||
mobile: JQueryMobile;
|
||||
}
|
||||
Vendored
+560
-298
File diff suppressed because it is too large
Load Diff
Vendored
+177
@@ -0,0 +1,177 @@
|
||||
/// <reference path="backbone-0.9.d.ts" />
|
||||
/// <reference path="knockout-2.2.d.ts" />
|
||||
declare module Knockback {
|
||||
export interface EventWatcherOptions {
|
||||
emitter: (newEmitter) => void;
|
||||
update: (newValue) => void;
|
||||
event_selector: string;
|
||||
key?: string;
|
||||
}
|
||||
|
||||
export interface FactoryOptions {
|
||||
factories: any;
|
||||
}
|
||||
|
||||
export interface StoreOptions {
|
||||
creator: any;
|
||||
path: string;
|
||||
store: Store;
|
||||
factory: Factory;
|
||||
}
|
||||
|
||||
export class Destroyable {
|
||||
destroy();
|
||||
}
|
||||
|
||||
export class ViewModel extends Destroyable {
|
||||
constructor (model?: Backbone.Model, options?: ViewModelOptions, viewModel?: ViewModel);
|
||||
shareOptions(): ViewModelOptions;
|
||||
extend(source: any);
|
||||
model(): Backbone.Model;
|
||||
}
|
||||
|
||||
export class EventWatcher extends Destroyable {
|
||||
static useOptionsOrCreate(options, emitter: KnockoutObservableAny, obj: Backbone.Model, callback_options: any);
|
||||
|
||||
emitter(): Backbone.Model;
|
||||
emitter(newEmitter: Backbone.Model);
|
||||
registerCallbacks(obj: any, callback_info: any);
|
||||
releaseCallbacks(obj: any);
|
||||
}
|
||||
|
||||
export class Factory {
|
||||
static useOptionsOrCreate(options: FactoryOptions, obj: any, owner_path: string);
|
||||
|
||||
constructor (parent_factory: any);
|
||||
hasPath(path: string): bool;
|
||||
addPathMapping(path: string, create_info);
|
||||
addPathMappings(factories: any, owner_path: string);
|
||||
hasPathMappings(factories: any, owner_path: string): bool;
|
||||
creatorForPath(obj: any, path: string);
|
||||
}
|
||||
|
||||
export class Store extends Destroyable {
|
||||
static useOptionsOrCreate(options: StoreOptions, obj: any, observable: KnockoutObservableAny);
|
||||
|
||||
constructor (model:Backbone.Model, options: StoreOptions);
|
||||
clear();
|
||||
register(obj: Backbone.Model, observable: KnockoutObservableAny, options: StoreOptions);
|
||||
findOrCreate(obj: Backbone.Model, options: StoreOptions);
|
||||
}
|
||||
|
||||
export class DefaultObservable extends Destroyable {
|
||||
constructor (targetObservable: KnockoutObservableAny, defaultValue: any);
|
||||
setToDefault();
|
||||
}
|
||||
|
||||
export class FormattedObservable extends Destroyable {
|
||||
constructor (format: string, args: any[]);
|
||||
constructor (format: KnockoutObservableAny, args: any[]);
|
||||
}
|
||||
|
||||
export interface LocalizedObservable {
|
||||
constructor (value: any, options: any, vm: any);
|
||||
destroy();
|
||||
resetToCurrent();
|
||||
observedValue(value: any);
|
||||
}
|
||||
|
||||
export class TriggeredObservable extends Destroyable {
|
||||
constructor (emitter: Backbone.ModelBase, event: string);
|
||||
emitter(): Backbone.ModelBase;
|
||||
emitter(newEmitter: Backbone.ModelBase);
|
||||
}
|
||||
|
||||
export class Statistics {
|
||||
constructor ();
|
||||
clear();
|
||||
addModelEvent(event: string);
|
||||
modelEventsStatsString();
|
||||
register(key: string, obj: any);
|
||||
unregister(key: string, obj: any);
|
||||
registeredCount(type: any): number;
|
||||
registeredStatsString(success_message: string): string;
|
||||
}
|
||||
|
||||
export interface OptionsBase {
|
||||
path?: string; // the path to the value (used to create related observables from the factory).
|
||||
store?: Store; // a store used to cache and share view models.
|
||||
factory?: Factory; // a factory used to create view models.
|
||||
options?: any; // a set of options merge into these options using _.defaults. Useful for extending options when deriving classes rather than merging them by hand.
|
||||
}
|
||||
|
||||
export interface ViewModelOptions extends OptionsBase {
|
||||
internals?: string[]; // an array of atttributes that should be scoped with an underscore, eg. name -> _name
|
||||
requires?: string[]; // an array of atttributes that will have kb.Observables created even if they do not exist on the Backbone.Model. Useful for binding Views that require specific observables to exist
|
||||
keys?: string[]; // restricts the keys used on a model. Useful for reducing the number of kb.Observables created from a limited set of Backbone.Model attributes
|
||||
if(objOrArray: any); // an array is supplied, excludes keys to exclude on the view model; for example, if you want to provide a custom implementation. If an Object, it provides options to the kb.Observable constructor.
|
||||
path?: string; // the path to the value (used to create related observables from the factory).
|
||||
factories?: any; // a map of dot-deliminated paths; for example {'models.name': kb.ViewModel} to either constructors or create functions. Signature: {'some.path': function(object, options)}
|
||||
}
|
||||
|
||||
export interface CollectionOptions extends OptionsBase {
|
||||
models_only?: bool; // flag for skipping the creation of view models. The collection observable will be populated with (possibly sorted) models.
|
||||
view_model?: any; // (Constructor) — the view model constructor used for models in the collection. Signature: constructor(model, options)
|
||||
create?: any; // a function used to create a view model for models in the collection. Signature: create(model, options)
|
||||
factories?: any; // a map of dot-deliminated paths; for example 'models.owner': kb.ViewModel to either constructors or create functions. Signature: 'some.path': function(object, options)
|
||||
comparator?: any; //a function that is used to sort an object. Signature: function(model_a, model_b) returns negative value for ascending, 0 for equal, and positive for descending
|
||||
sort_attribute?: string; // the name of an attribute. Default: resort on all changes to a model.
|
||||
filters?: any; // filters can be individual ids (observable or simple) or arrays of ids, functions, or arrays of functions.
|
||||
}
|
||||
|
||||
export interface CollectionObservable extends KnockoutObservableArray {
|
||||
collection(colleciton: Backbone.Collection);
|
||||
collection(): Backbone.Collection;
|
||||
destroy();
|
||||
shareOptions(): CollectionOptions;
|
||||
filters(id: any) : Backbone.Model;
|
||||
filters(ids: any[]): CollectionObservable;
|
||||
filters(iterator: (element: Backbone.Model) => bool): CollectionObservable;
|
||||
comparator(comparatorFunction: any);
|
||||
sortAttribute(attr: string);
|
||||
viewModelByModel(model: Backbone.Model): ViewModel;
|
||||
hasViewModels(): bool;
|
||||
}
|
||||
|
||||
export interface Utils {
|
||||
wrappedObservable(obj: any): any;
|
||||
wrappedObservable(obj: any, value: any);
|
||||
wrappedObject(obj: any): any;
|
||||
wrappedObject(obj: any, value: any);
|
||||
wrappedModel(obj: any): any;
|
||||
wrappedModel(obj: any, value: any);
|
||||
wrappedStore(obj: any): any;
|
||||
wrappedStore(obj: any, value: any);
|
||||
wrappedFactory(obj: any): any;
|
||||
wrappedFactory(obj: any, value: any);
|
||||
wrappedEventWatcher(obj: any): any;
|
||||
wrappedEventWatcher(obj: any, value: any);
|
||||
wrappedDestroy(obj: any);
|
||||
valueType(observable: KnockoutObservableAny): any;
|
||||
pathJoin(path1: string, path2: string): string;
|
||||
optionsPathJoin(options: any, path: string): any;
|
||||
inferCreator(value: any, factory: Factory, path: string, owner: any, key: string);
|
||||
createFromDefaultCreator(obj: any, options?: any);
|
||||
hasModelSignature(obj: any): bool;
|
||||
hasCollectionSignature(obj: any): bool;
|
||||
}
|
||||
|
||||
export interface Static extends Utils {
|
||||
collectionObservable(model?: Backbone.Collection, options?: CollectionOptions): CollectionObservable;
|
||||
observable(model?: Backbone.Model, options?: any): KnockoutObservableAny;
|
||||
viewModel(model?: Backbone.Model, options?: any): KnockoutObservableAny;
|
||||
defaultObservable(targetObservable: KnockoutObservableAny, defaultValue: any): KnockoutObservableAny;
|
||||
formattedObservable(format: string, args: any[]): KnockoutObservableAny;
|
||||
formattedObservable(format: KnockoutObservableAny, args: any[]): KnockoutObservableAny;
|
||||
localizedObservable(data: any, options: any): KnockoutObservableAny;
|
||||
release(object: any, pre_release?: () => void);
|
||||
releaseKeys(object: any);
|
||||
releaseOnNodeRemove(viewmodel: ViewModel, node: Element);
|
||||
renderTemplate(template: string, viewModel: ViewModel, options: any);
|
||||
renderAutoReleasedTemplate(template: string, viewModel: ViewModel, options: any);
|
||||
applyBindings(viewModel: ViewModel, node?: Element);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
declare var kb: Knockback.Static;
|
||||
Vendored
-126
@@ -1,126 +0,0 @@
|
||||
// Type definitions for Knockout 2.1.0
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface KnockoutObservableArrayFunctions {
|
||||
// General Array functions
|
||||
indexOf(searchElement, fromIndex?: number): number;
|
||||
slice(start: number, end?: number): any[];
|
||||
splice(start: number): any[];
|
||||
splice(start: number, deleteCount: number, ...items: any[]): any[];
|
||||
pop();
|
||||
push(...items: any[]): void;
|
||||
shift();
|
||||
unshift(...items: any[]): number;
|
||||
reverse(): any[];
|
||||
sort(): void;
|
||||
sort(compareFunction): void;
|
||||
|
||||
// Ko specific
|
||||
remove(item): any[];
|
||||
removeAll(items: any[]): any[];
|
||||
removeAll(): any[];
|
||||
|
||||
destroy(item): void;
|
||||
destroyAll(items: any[]): void;
|
||||
destroyAll(): void;
|
||||
}
|
||||
|
||||
interface KnockoutObservableArray extends KnockoutObservableArrayFunctions {
|
||||
(): any[];
|
||||
(value: any[]): void;
|
||||
}
|
||||
|
||||
interface KnockoutObservableArrayStatic {
|
||||
(): KnockoutObservableArray;
|
||||
fn: KnockoutObservableArrayFunctions;
|
||||
}
|
||||
|
||||
interface KnockoutObservable {
|
||||
(): any;
|
||||
(value): void;
|
||||
|
||||
subscribe(func: Function): void;
|
||||
}
|
||||
|
||||
interface KnockoutComputed extends KnockoutObservable {
|
||||
}
|
||||
|
||||
interface KnockoutComputedDefine {
|
||||
read(): any;
|
||||
write(any);
|
||||
}
|
||||
|
||||
interface KnockoutComputedStatic {
|
||||
(): KnockoutComputed;
|
||||
(func: Function): KnockoutComputed;
|
||||
(def: KnockoutComputedDefine) : KnockoutComputed;
|
||||
}
|
||||
|
||||
interface KnockoutBindingContext {
|
||||
$parent: any;
|
||||
$parents: any[];
|
||||
$root: any;
|
||||
$data: any;
|
||||
$index?: number;
|
||||
$parentContext?: KnockoutBindingContext;
|
||||
}
|
||||
|
||||
interface KnockoutBindingHandler {
|
||||
// TODO: Work out how to define bindingHandlers when not using all the args
|
||||
// adding element?: any, etc doesnt work...
|
||||
//init(element: any, valueAccessor: any, allBindingsAccessor: any, viewModel: any, bindingContext: KnockoutBindingContext) : void;
|
||||
//update(element: any, valueAccessor: any, allBindingsAccessor: any, viewModel: any, bindingContext: KnockoutBindingContext) : void;
|
||||
init: any;
|
||||
update: any;
|
||||
}
|
||||
|
||||
interface KnockoutBindingHandlers {
|
||||
value: KnockoutBindingHandler;
|
||||
}
|
||||
|
||||
interface KnockoutStatic {
|
||||
utils: KnockoutUtilsStatic;
|
||||
bindingHandlers: KnockoutBindingHandlers;
|
||||
applyBindings(viewModel, rootNode?);
|
||||
computed : KnockoutComputedStatic;
|
||||
observableArray: KnockoutObservableArrayStatic;
|
||||
observable(intial?): KnockoutObservable;
|
||||
}
|
||||
|
||||
interface KnockoutUtilsStatic {
|
||||
arrayForEach(array: any[], action);
|
||||
arrayIndexOf(array: any[], item);
|
||||
arrayFirst(array: any[], predicate, predicateOwner?);
|
||||
arrayRemoveItem(array: any[], itemToRemove);
|
||||
arrayGetDistinctValues(array: any[]);
|
||||
arrayMap(array: any[], mapping);
|
||||
arrayFilter(array: any[], predicate);
|
||||
arrayPushAll(array: any[], valuesToPush);
|
||||
extend(target, source);
|
||||
emptyDomNode(domNode);
|
||||
moveCleanedNodesToContainerElement(nodes);
|
||||
setDomNodeChildren(domNode, childNodes);
|
||||
replaceDomNodes(nodeToReplaceOrNodeArray, newNodesArray);
|
||||
setOptionNodeSelectionState(optionNode, isSelected);
|
||||
stringTrim(str: string);
|
||||
stringTokenize(str: string, delimiter);
|
||||
stringStartsWith(str: string, startsWith);
|
||||
buildEvalWithinScopeFunction(expression, scopeLevels);
|
||||
domNodeIsContainedBy(node, containedByNode);
|
||||
domNodeIsAttachedToDocument(node);
|
||||
tagNameLower(element);
|
||||
registerEventHandler(element, eventType, handler);
|
||||
triggerEvent(element, eventType);
|
||||
unwrapObservable(value);
|
||||
toggleDomNodeCssClass(node, className, shouldHaveClass);
|
||||
setTextContent(element, textContent);
|
||||
ensureSelectElementIsRenderedCorrectly(selectElement);
|
||||
range(min, max);
|
||||
makeArray(arrayLikeObject);
|
||||
getFormFields(form, fieldName);
|
||||
parseJson(jsonString);
|
||||
stringifyJson(data, replacer, space);
|
||||
postJson(urlOrForm, data, options);
|
||||
}
|
||||
|
||||
declare var ko: KnockoutStatic;
|
||||
Vendored
+294
@@ -0,0 +1,294 @@
|
||||
// Type definitions for Knockout 2.2
|
||||
// Project: http://knockoutjs.com
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface KnockoutSubscribableFunctions {
|
||||
extend(source);
|
||||
dispose(): void;
|
||||
peek(): any;
|
||||
valueHasMutated(): void;
|
||||
|
||||
valueWillMutate(): void;
|
||||
}
|
||||
|
||||
interface KnockoutComputedFunctions extends KnockoutSubscribableFunctions {
|
||||
getDependenciesCount(): number;
|
||||
hasWriteFunction(): bool;
|
||||
}
|
||||
|
||||
interface KnockoutObservableFunctions extends KnockoutSubscribableFunctions {
|
||||
}
|
||||
|
||||
interface KnockoutObservableArrayFunctions extends KnockoutObservableFunctions {
|
||||
// General Array functions
|
||||
indexOf(searchElement, fromIndex?: number): number;
|
||||
slice(start: number, end?: number): any[];
|
||||
splice(start: number): any[];
|
||||
splice(start: number, deleteCount: number, ...items: any[]): any[];
|
||||
pop();
|
||||
push(...items: any[]): void;
|
||||
shift();
|
||||
unshift(...items: any[]): number;
|
||||
reverse(): any[];
|
||||
sort(): void;
|
||||
sort(compareFunction): void;
|
||||
|
||||
// Ko specific
|
||||
remove(item): any[];
|
||||
removeAll(items: any[]): any[];
|
||||
removeAll(): any[];
|
||||
|
||||
destroy(item): void;
|
||||
destroyAll(items: any[]): void;
|
||||
destroyAll(): void;
|
||||
}
|
||||
|
||||
interface KnockoutSubscribableStatic {
|
||||
fn: KnockoutSubscribableFunctions;
|
||||
|
||||
new (): KnockoutSubscription;
|
||||
}
|
||||
|
||||
interface KnockoutSubscription extends KnockoutSubscribableFunctions {
|
||||
subscribe(callback: (newValue: any) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite, topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutComputedStatic {
|
||||
fn: KnockoutComputedFunctions;
|
||||
|
||||
(): KnockoutComputed;
|
||||
(func: Function, context?: any): KnockoutComputed;
|
||||
(def: KnockoutComputedDefine): KnockoutComputed;
|
||||
(options?: any): KnockoutComputed;
|
||||
}
|
||||
|
||||
interface KnockoutComputed extends KnockoutComputedFunctions {
|
||||
(): any;
|
||||
(value: any): void;
|
||||
|
||||
subscribe(callback: (newValue: any) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite, topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutObservableArrayStatic {
|
||||
|
||||
fn: KnockoutObservableArrayFunctions;
|
||||
|
||||
(): KnockoutObservableArray;
|
||||
(value: any[]): KnockoutObservableArray;
|
||||
}
|
||||
|
||||
interface KnockoutObservableArray extends KnockoutObservableArrayFunctions {
|
||||
(): any[];
|
||||
(value: any[]): void;
|
||||
|
||||
subscribe(callback: (newValue: any[]) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite: any[], topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutObservableStatic {
|
||||
fn: KnockoutObservableFunctions;
|
||||
|
||||
(value: string): KnockoutObservableString;
|
||||
(value: Date): KnockoutObservableDate;
|
||||
(value: number): KnockoutObservableNumber;
|
||||
(value: bool): KnockoutObservableBool;
|
||||
(value?: any): KnockoutObservableAny;
|
||||
}
|
||||
|
||||
interface KnockoutObservableBase extends KnockoutObservableFunctions {
|
||||
}
|
||||
|
||||
interface KnockoutObservableAny extends KnockoutObservableBase {
|
||||
|
||||
(): any;
|
||||
(value): void;
|
||||
|
||||
subscribe(callback: (newValue: any) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite, topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutObservableString extends KnockoutObservableBase {
|
||||
(): string;
|
||||
(value: string): void;
|
||||
|
||||
subscribe(callback: (newValue: string) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite: string, topic?: string);
|
||||
}
|
||||
|
||||
|
||||
interface KnockoutObservableNumber extends KnockoutObservableBase {
|
||||
(): number;
|
||||
(value: number): void;
|
||||
|
||||
subscribe(callback: (newValue: number) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite: number, topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutObservableBool extends KnockoutObservableBase {
|
||||
(): bool;
|
||||
(value: bool): void;
|
||||
|
||||
subscribe(callback: (newValue: bool) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite: bool, topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutObservableDate extends KnockoutObservableBase {
|
||||
(): Date;
|
||||
(value: Date): void;
|
||||
|
||||
subscribe(callback: (newValue: Date) => void, target?:any, topic?: string): KnockoutSubscription;
|
||||
notifySubscribers(valueToWrite: Date, topic?: string);
|
||||
}
|
||||
|
||||
interface KnockoutComputedDefine {
|
||||
read(): any;
|
||||
write(any);
|
||||
}
|
||||
|
||||
interface KnockoutBindingContext {
|
||||
$parent: any;
|
||||
$parents: any[];
|
||||
$root: any;
|
||||
$data: any;
|
||||
$index?: number;
|
||||
$parentContext?: KnockoutBindingContext;
|
||||
|
||||
extend(any): any;
|
||||
createChildContext(any): any;
|
||||
}
|
||||
|
||||
interface KnockoutBindingHandler {
|
||||
init?(element: any, valueAccessor: () => any, allBindingsAccessor: () => any, viewModel: any, bindingContext: KnockoutBindingContext): void;
|
||||
update?(element: any, valueAccessor: () => any, allBindingsAccessor: () => any, viewModel: any, bindingContext: KnockoutBindingContext): void;
|
||||
options?: any;
|
||||
}
|
||||
|
||||
interface KnockoutBindingHandlers {
|
||||
// Controlling text and appearance
|
||||
visible: KnockoutBindingHandler;
|
||||
text: KnockoutBindingHandler;
|
||||
html: KnockoutBindingHandler;
|
||||
css: KnockoutBindingHandler;
|
||||
style: KnockoutBindingHandler;
|
||||
attr: KnockoutBindingHandler;
|
||||
|
||||
// Control Flow
|
||||
foreach: KnockoutBindingHandler;
|
||||
if: KnockoutBindingHandler;
|
||||
ifnot: KnockoutBindingHandler;
|
||||
with: KnockoutBindingHandler;
|
||||
|
||||
// Working with form fields
|
||||
click: KnockoutBindingHandler;
|
||||
event: KnockoutBindingHandler;
|
||||
submit: KnockoutBindingHandler;
|
||||
enable: KnockoutBindingHandler;
|
||||
disable: KnockoutBindingHandler;
|
||||
value: KnockoutBindingHandler;
|
||||
hasfocus: KnockoutBindingHandler;
|
||||
checked: KnockoutBindingHandler;
|
||||
options: KnockoutBindingHandler;
|
||||
selectedOptions: KnockoutBindingHandler;
|
||||
uniqueName: KnockoutBindingHandler;
|
||||
|
||||
// Rendering templates
|
||||
template: KnockoutBindingHandler;
|
||||
}
|
||||
|
||||
interface KnockoutMemoization {
|
||||
memoize(callback);
|
||||
unmemoize(memoId, callbackParams);
|
||||
unmemoizeDomNodeAndDescendants(domNode, extraCallbackParamsArray);
|
||||
parseMemoText(memoText);
|
||||
}
|
||||
|
||||
interface KnockoutVirtualElements {
|
||||
allowedBindings;
|
||||
emptyNode;
|
||||
firstChild;
|
||||
insertAfter;
|
||||
nextSibling;
|
||||
prepend;
|
||||
setDomNodeChildren;
|
||||
}
|
||||
|
||||
interface KnockoutExtenders {
|
||||
throttle(target: any, timeout: number): KnockoutComputed;
|
||||
notify(target: any, notifyWhen: string): any;
|
||||
}
|
||||
|
||||
interface KnockoutUtils {
|
||||
|
||||
fieldsIncludedWithJsonPost: any[];
|
||||
|
||||
arrayForEach(array: any[], action: (any) => void ): void;
|
||||
arrayIndexOf(array: any[], item: any): number;
|
||||
arrayFirst(array: any[], predicate: (item) => bool, predicateOwner?: any): any;
|
||||
arrayRemoveItem(array: any[], itemToRemove: any): void;
|
||||
arrayGetDistinctValues(array: any[]): any[];
|
||||
arrayMap(array: any[], mapping: (item) => any): any[];
|
||||
arrayFilter(array: any[], predicate: (item) => bool): any[];
|
||||
arrayPushAll(array: any[], valuesToPush: any[]): any[];
|
||||
|
||||
extend(target, source);
|
||||
|
||||
emptyDomNode(domNode): void;
|
||||
moveCleanedNodesToContainerElement(nodes: any[]): HTMLElement;
|
||||
cloneNodes(nodesArray: any[], shouldCleanNodes: bool): any[];
|
||||
setDomNodeChildren(domNode: any, childNodes: any[]): void;
|
||||
replaceDomNodes(nodeToReplaceOrNodeArray: any, newNodesArray: any[]): void;
|
||||
setOptionNodeSelectionState(optionNode: any, isSelected: bool): void;
|
||||
stringTrim(str: string): string;
|
||||
stringTokenize(str: string, delimiter: string): string;
|
||||
stringStartsWith(str: string, startsWith: string): string;
|
||||
domNodeIsContainedBy(node: any, containedByNode: any): bool;
|
||||
domNodeIsAttachedToDocument(node: any): bool;
|
||||
tagNameLower(element: any): string;
|
||||
registerEventHandler(element: any, eventType: any, handler: Function): void;
|
||||
triggerEvent(element: any, eventType: any): void;
|
||||
unwrapObservable(value: any): any;
|
||||
toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: bool): void;
|
||||
setTextContent(element: any, textContent: string): void;
|
||||
setElementName(element: any, name: string): void;
|
||||
ensureSelectElementIsRenderedCorrectly(selectElement);
|
||||
forceRefresh(node: any): void;
|
||||
ensureSelectElementIsRenderedCorrectly(selectElement: any): void;
|
||||
range(min: any, max: any): any;
|
||||
makeArray(arrayLikeObject: any): any[];
|
||||
getFormFields(form: any, fieldName: string): any[];
|
||||
parseJson(jsonString: string): any;
|
||||
stringifyJson(data: any, replacer: Function, space: string): string;
|
||||
postJson(urlOrForm: any, data: any, options: any): void;
|
||||
|
||||
domNodeDisposal;
|
||||
}
|
||||
|
||||
|
||||
interface KnockoutStatic {
|
||||
utils: KnockoutUtils;
|
||||
memoization: KnockoutMemoization;
|
||||
bindingHandlers: KnockoutBindingHandlers;
|
||||
virtualElements: KnockoutVirtualElements;
|
||||
extenders: KnockoutExtenders;
|
||||
|
||||
applyBindings(viewModel: any, rootNode?: any): void;
|
||||
applyBindingsToDescendants(viewModel: any, rootNode: any): void;
|
||||
|
||||
subscribable: KnockoutSubscribableStatic;
|
||||
observable: KnockoutObservableStatic;
|
||||
computed: KnockoutComputedStatic;
|
||||
observableArray: KnockoutObservableArrayStatic;
|
||||
|
||||
contextFor(node: any): any;
|
||||
isSubscribable(instance: any): bool;
|
||||
toJSON(viewModel: any, replacer?: Function, space?: any): string;
|
||||
toJS(viewModel: any): any;
|
||||
isObservable(instance: any): bool;
|
||||
dataFor(node: any): any;
|
||||
removeNode(node: Element);
|
||||
}
|
||||
|
||||
declare var ko: KnockoutStatic;
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
// Type definitions for Knockout.Mapping 2.0
|
||||
// Project: https://github.com/SteveSanderson/knockout.mapping
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface KnockoutMappingOptions {
|
||||
ignore;
|
||||
include;
|
||||
copy;
|
||||
mappedProperties;
|
||||
deferEvaluation;
|
||||
}
|
||||
|
||||
interface KnockoutMapping {
|
||||
isMapped(viewModel: any): bool;
|
||||
fromJS(jsObject: any): any;
|
||||
fromJS(jsObject: any, targetOrOptions: any): any;
|
||||
fromJS(jsObject: any, inputOptions: any, target: any): any;
|
||||
fromJSON(jsonString: string): any;
|
||||
toJS(rootObject: any, options?: KnockoutMappingOptions): any;
|
||||
toJSON(rootObject: any, options?: KnockoutMappingOptions): any;
|
||||
defaultOptions(): KnockoutMappingOptions;
|
||||
resetDefaultOptions(): void;
|
||||
getType(x: any): any;
|
||||
visitModel(rootObject: any, callback: Function, options?: { visitedObjects?; parentName?; ignore?; copy?; include?; } ): any;
|
||||
}
|
||||
|
||||
interface KnockoutStatic {
|
||||
mapping: KnockoutMapping;
|
||||
}
|
||||
Vendored
+222
@@ -0,0 +1,222 @@
|
||||
// Type definitions for linq.js 2.2
|
||||
// Project: http://linqjs.codeplex.com/
|
||||
// Definitions by: Marcin Najder
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// todo: jQuery plugin, RxJS Binding
|
||||
|
||||
module linq {
|
||||
|
||||
interface EnumerableStatic {
|
||||
Choice(...contents: any[]): Enumerable;
|
||||
Choice(contents: any[]): Enumerable;
|
||||
Cycle(...contents: any[]): Enumerable;
|
||||
Cycle(contents: any[]): Enumerable;
|
||||
Empty(): Enumerable;
|
||||
From(obj: any[]): Enumerable;
|
||||
From(obj: any): Enumerable;
|
||||
Return(element: any): Enumerable;
|
||||
Matches(input: string, pattern: RegExp): Enumerable;
|
||||
Matches(input: string, pattern: string, flags?: string): Enumerable;
|
||||
Range(start: number, count: number, step?: number): Enumerable;
|
||||
RangeDown(start: number, count: number, step?: number): Enumerable;
|
||||
RangeTo(start: number, to: number, step?: number): Enumerable;
|
||||
Repeat(obj: any, count?: number): Enumerable;
|
||||
RepeatWithFinalize(initializer: () => any, finalizer: (resource: any) =>void ): Enumerable;
|
||||
Generate(func: () => any, count?: number): Enumerable;
|
||||
Generate(func: string, count?: number): Enumerable;
|
||||
ToInfinity(start?: number, step?: number): Enumerable;
|
||||
ToNegativeInfinity(start?: number, step?: number): Enumerable;
|
||||
Unfold(seed, func: ($) => any): Enumerable;
|
||||
Unfold(seed, func: string): Enumerable;
|
||||
}
|
||||
|
||||
interface Enumerable {
|
||||
//Projection and Filtering Methods
|
||||
CascadeBreadthFirst(func: ($) => any[], resultSelector: (v, i: number) => any): Enumerable;
|
||||
CascadeBreadthFirst(func: string, resultSelector: string): Enumerable;
|
||||
CascadeDepthFirst(func: ($) => any[], resultSelector: (v, i: number) => any): Enumerable;
|
||||
CascadeDepthFirst(func: string, resultSelector: string): Enumerable;
|
||||
Flatten(...items: any[]): Enumerable;
|
||||
Pairwise(selector: (prev, next) => any): Enumerable;
|
||||
Pairwise(selector: string): Enumerable;
|
||||
Scan(func: (a, b) => any): Enumerable;
|
||||
Scan(func: string): Enumerable;
|
||||
Scan(seed, func: (a, b) => any, resultSelector?: ($) => any): Enumerable;
|
||||
Scan(seed, func: string, resultSelector?: string): Enumerable;
|
||||
Select(selector: ($, i: number) => any): Enumerable;
|
||||
Select(selector: string): Enumerable;
|
||||
SelectMany(collectionSelector: ($, i: number) => any[], resultSelector?: ($, item) => any): Enumerable;
|
||||
SelectMany(collectionSelector: ($, i: number) => Enumerable, resultSelector?: ($, item) => any): Enumerable;
|
||||
SelectMany(collectionSelector: string, resultSelector?: string): Enumerable;
|
||||
Where(predicate: ($, i: number) => bool): Enumerable;
|
||||
Where(predicate: string): Enumerable;
|
||||
OfType(type: Function): Enumerable;
|
||||
Zip(second: any[], selector: (v1, v2, i: number) => any): Enumerable;
|
||||
Zip(second: any[], selector: string): Enumerable;
|
||||
Zip(second: Enumerable, selector: (v1, v2, i: number) => any): Enumerable;
|
||||
Zip(second: Enumerable, selector: string): Enumerable;
|
||||
//Join Methods
|
||||
Join(inner: any[], outerKeySelector: (v1) => any, innerKeySelector: (v1) => any, resultSelector: (v1, v2) => any, compareSelector?: (v) => any): Enumerable;
|
||||
Join(inner: any[], outerKeySelector: string, innerKeySelector: string, resultSelector: string, compareSelector?: string): Enumerable;
|
||||
Join(inner: Enumerable, outerKeySelector: (v1) => any, innerKeySelector: (v1) => any, resultSelector: (v1, v2) => any, compareSelector?: (v) => any): Enumerable;
|
||||
Join(inner: Enumerable, outerKeySelector: string, innerKeySelector: string, resultSelector: string, compareSelector?: string): Enumerable;
|
||||
GroupJoin(inner: any[], outerKeySelector: (v1) => any, innerKeySelector: (v1) => any, resultSelector: (v1, v2: Enumerable) => any, compareSelector?: (v) => any): Enumerable;
|
||||
GroupJoin(inner: any[], outerKeySelector: string, innerKeySelector: string, resultSelector: string, compareSelector?: string): Enumerable;
|
||||
GroupJoin(inner: Enumerable, outerKeySelector: (v1) => any, innerKeySelector: (v1) => any, resultSelector: (v1, v2: Enumerable) => any, compareSelector?: (v) => any): Enumerable;
|
||||
GroupJoin(inner: Enumerable, outerKeySelector: string, innerKeySelector: string, resultSelector: string, compareSelector?: string): Enumerable;
|
||||
//Set Methods
|
||||
All(predicate: ($) => bool): bool;
|
||||
All(predicate: string): bool;
|
||||
Any(predicate?: ($) => bool): bool;
|
||||
Any(predicate?: string): bool;
|
||||
Concat(second: any[]): Enumerable;
|
||||
Concat(second: Enumerable): Enumerable;
|
||||
Insert(index: number, second: any[]): Enumerable;
|
||||
Insert(index: number, second: Enumerable): Enumerable;
|
||||
Alternate(value): Enumerable;
|
||||
Contains(value, compareSelector?: ($) => any): bool;
|
||||
Contains(value, compareSelector?: string): bool;
|
||||
DefaultIfEmpty(defaultValue): Enumerable;
|
||||
Distinct(compareSelector?: ($) => any): Enumerable;
|
||||
Distinct(compareSelector?: string): Enumerable;
|
||||
Except(second: any[], compareSelector?: ($) => any): Enumerable;
|
||||
Except(second: any[], compareSelector?: string): Enumerable;
|
||||
Except(second: Enumerable, compareSelector?: ($) => any): Enumerable;
|
||||
Except(second: Enumerable, compareSelector?: string): Enumerable;
|
||||
Intersect(second: any[], compareSelector?: ($) => any): Enumerable;
|
||||
Intersect(second: any[], compareSelector?: string): Enumerable;
|
||||
Intersect(second: Enumerable, compareSelector?: ($) => any): Enumerable;
|
||||
Intersect(second: Enumerable, compareSelector?: string): Enumerable;
|
||||
SequenceEqual(second: any[], compareSelector?: ($) => any): bool;
|
||||
SequenceEqual(second: any[], compareSelector?: string): bool;
|
||||
SequenceEqual(second: Enumerable, compareSelector?: ($) => any): bool;
|
||||
SequenceEqual(second: Enumerable, compareSelector?: string): bool;
|
||||
Union(second: any[], compareSelector?: ($) => any): Enumerable;
|
||||
Union(second: any[], compareSelector?: string): Enumerable;
|
||||
Union(second: Enumerable, compareSelector?: ($) => any): Enumerable;
|
||||
Union(second: Enumerable, compareSelector?: string): Enumerable;
|
||||
//Ordering Methods
|
||||
OrderBy(keySelector?: ($) => any): OrderedEnumerable;
|
||||
OrderBy(keySelector?: string): OrderedEnumerable;
|
||||
OrderByDescending(keySelector?: ($) => any): OrderedEnumerable;
|
||||
OrderByDescending(keySelector?: string): OrderedEnumerable;
|
||||
Reverse(): Enumerable;
|
||||
Shuffle(): Enumerable;
|
||||
//Grouping Methods
|
||||
GroupBy(keySelector: ($) => any, elementSelector?: ($) => any, resultSelector?: (key, e) => any, compareSelector?: ($) =>any): Enumerable;
|
||||
GroupBy(keySelector: string, elementSelector?: string, resultSelector?: string, compareSelector?: string): Enumerable;
|
||||
PartitionBy(keySelector: ($) => any, elementSelector?: ($) => any, resultSelector?: (key, e) => any, compareSelector?: ($) =>any): Enumerable;
|
||||
PartitionBy(keySelector: string, elementSelector?: string, resultSelector?: string, compareSelector?: string): Enumerable;
|
||||
BufferWithCount(count: number): Enumerable;
|
||||
// Aggregate Methods
|
||||
Aggregate(func: (a, b) => any);
|
||||
Aggregate(seed, func: (a, b) => any, resultSelector?: ($) => any);
|
||||
Aggregate(func: string);
|
||||
Aggregate(seed, func: string, resultSelector?: string);
|
||||
Average(selector?: ($) => number): number;
|
||||
Average(selector?: string): number;
|
||||
Count(predicate?: ($) => bool): number;
|
||||
Count(predicate?: string): number;
|
||||
Max(selector?: ($) => number): number;
|
||||
Max(selector?: string): number;
|
||||
Min(selector?: ($) => number): number;
|
||||
Min(selector?: string): number;
|
||||
MaxBy(selector: ($) => number): any;
|
||||
MaxBy(selector: string): any;
|
||||
MinBy(selector: ($) => number): any;
|
||||
MinBy(selector: string): any;
|
||||
Sum(selector?: ($) => number): number;
|
||||
Sum(selector?: string): number;
|
||||
//Paging Methods
|
||||
ElementAt(index: number): any;
|
||||
ElementAtOrDefault(index: number, defaultValue): any;
|
||||
First(predicate?: ($) => bool): any;
|
||||
First(predicate?: string): any;
|
||||
FirstOrDefault(defaultValue, predicate?: ($) => bool): any;
|
||||
FirstOrDefault(defaultValue, predicate?: string): any;
|
||||
Last(predicate?: ($) => bool): any;
|
||||
Last(predicate?: string): any;
|
||||
LastOrDefault(defaultValue, predicate?: ($) => bool): any;
|
||||
LastOrDefault(defaultValue, predicate?: string): any;
|
||||
Single(predicate?: ($) => bool): any;
|
||||
Single(predicate?: string): any;
|
||||
SingleOrDefault(defaultValue, predicate?: ($) => bool): any;
|
||||
SingleOrDefault(defaultValue, predicate?: string): any;
|
||||
Skip(count: number): Enumerable;
|
||||
SkipWhile(predicate: ($, i: number) => bool): Enumerable;
|
||||
SkipWhile(predicate: string): Enumerable;
|
||||
Take(count: number): Enumerable;
|
||||
TakeWhile(predicate: ($, i: number) => bool): Enumerable;
|
||||
TakeWhile(predicate: string): Enumerable;
|
||||
TakeExceptLast(count?: number): Enumerable;
|
||||
TakeFromLast(count: number): Enumerable;
|
||||
IndexOf(item): number;
|
||||
LastIndexOf(item): number;
|
||||
// Convert Methods
|
||||
ToArray(): any[];
|
||||
ToLookup(keySelector: ($) => any, elementSelector?: ($) => any, compareSelector?: (key) => any): Lookup;
|
||||
ToLookup(keySelector: string, elementSelector?: string, compareSelector?: string): Lookup;
|
||||
ToObject(keySelector: ($) => string, elementSelector: ($) => any): any;
|
||||
ToObject(keySelector: string, elementSelector: string): any;
|
||||
ToDictionary(keySelector: ($) => any, elementSelector: ($) => any, compareSelector?: (key) => any): Dictionary;
|
||||
ToDictionary(keySelector: string, elementSelector: string, compareSelector?: string): Dictionary;
|
||||
ToJSON(replacer?: (key, value) => any, space?: number): string;
|
||||
ToJSON(replacer?: string, space?: number): string;
|
||||
ToString(separator?: string, selector?: ($) =>any): string;
|
||||
ToString(separator?: string, selector?: string): string;
|
||||
//Action Methods
|
||||
Do(action: ($, i: number) => void ): Enumerable;
|
||||
Do(action: string): Enumerable;
|
||||
ForEach(action: ($, i: number) => void ): void;
|
||||
ForEach(func: ($, i: number) => bool): void;
|
||||
ForEach(action_func: string): void;
|
||||
Write(separator?: string, selector?: ($) =>any): void;
|
||||
Write(separator?: string, selector?: string): void;
|
||||
WriteLine(selector?: ($) =>any): void;
|
||||
Force(): void;
|
||||
//Functional Methods
|
||||
Let(func: (e: Enumerable) => Enumerable): Enumerable;
|
||||
Share(): Enumerable;
|
||||
MemoizeAll(): Enumerable;
|
||||
//Error Handling Methods
|
||||
Catch(handler: (error: Error) => void ): Enumerable;
|
||||
Catch(handler: string): Enumerable;
|
||||
Finally(finallyAction: () => void ): Enumerable;
|
||||
Finally(finallyAction: string): Enumerable;
|
||||
//For Debug Methods
|
||||
Trace(message?: string, selector?: ($) =>any): Enumerable;
|
||||
Trace(message?: string, selector?: string): Enumerable;
|
||||
}
|
||||
|
||||
interface OrderedEnumerable extends Enumerable {
|
||||
ThenBy(keySelector: ($) => any): OrderedEnumerable;
|
||||
ThenBy(keySelector: string): OrderedEnumerable;
|
||||
ThenByDescending(keySelector: ($) => any): OrderedEnumerable;
|
||||
ThenByDescending(keySelector: string): OrderedEnumerable;
|
||||
}
|
||||
|
||||
interface Grouping extends Enumerable {
|
||||
Key();
|
||||
}
|
||||
|
||||
interface Lookup {
|
||||
Count(): number;
|
||||
Get(key): Enumerable;
|
||||
Contains(key): bool;
|
||||
ToEnumerable(): Enumerable;
|
||||
}
|
||||
|
||||
interface Dictionary {
|
||||
Add(key, value): void;
|
||||
Get(key): any;
|
||||
Set(key, value): bool;
|
||||
Contains(key): bool;
|
||||
Clear(): void;
|
||||
Remove(key): void;
|
||||
Count(): number;
|
||||
ToEnumerable(): Enumerable;
|
||||
}
|
||||
}
|
||||
|
||||
declare var Enumerable: linq.EnumerableStatic;
|
||||
Vendored
+3
-1
@@ -1,5 +1,7 @@
|
||||
// Type definitions for Modernizr 2.6.2
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
// Project: http://modernizr.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface AudioBool {
|
||||
ogg: bool;
|
||||
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
// Type definitions for msnodesql 0.2
|
||||
// Project: https://github.com/WindowsAzure/node-sqlserver
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
///<reference path='node-0.8.d.ts' />
|
||||
|
||||
declare module "msnodesql" {
|
||||
export function open(connectionString: string, callback: Function): Connection;
|
||||
|
||||
export function query(connectionString: string, query: string): StreamEvents;
|
||||
export function query(connectionString: string, query: string, callback: Callback): StreamEvents;
|
||||
export function query(connectionString: string, query: string, params, callback: Callback): StreamEvents;
|
||||
|
||||
export function queryRaw(connectionString: string, query: string): StreamEvents;
|
||||
export function queryRaw(connectionString: string, query: string, callback: Callback): StreamEvents;
|
||||
export function queryRaw(connectionString: string, query: string, params, callback: Callback): StreamEvents;
|
||||
|
||||
interface Callback {
|
||||
(err: Error, results: any[]): void;
|
||||
}
|
||||
|
||||
interface Errback {
|
||||
(err: Error): void;
|
||||
}
|
||||
|
||||
interface Connection {
|
||||
queryRaw(connectionString: string, query: string): StreamEvents;
|
||||
queryRaw(connectionString: string, query: string, callback: Callback): StreamEvents;
|
||||
queryRaw(connectionString: string, query: string, params, callback: Callback): StreamEvents;
|
||||
|
||||
query(connectionString: string, query: string): StreamEvents;
|
||||
query(connectionString: string, query: string, callback: Callback): StreamEvents;
|
||||
query(connectionString: string, query: string, params, callback: Callback): StreamEvents;
|
||||
|
||||
beginTransaction(callback?: Errback);
|
||||
commit(callback?: Errback);
|
||||
rollback(callback?: Errback);
|
||||
close(callback?: Errback);
|
||||
}
|
||||
|
||||
interface StreamEvents extends EventEmitter { }
|
||||
}
|
||||
Vendored
+3
-1
@@ -1,7 +1,9 @@
|
||||
// Type definitions for Mustache 0.7
|
||||
// Project: https://github.com/janl/mustache.js
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface MustacheScanner {
|
||||
string: string;
|
||||
tail: string;
|
||||
@@ -43,7 +45,7 @@ interface MustacheStatic {
|
||||
compile(template: string, tags): MustacheWriter;
|
||||
compilePartial(name: string, template: string, tags): MustacheWriter;
|
||||
compileTokens(tokens, template: string): MustacheWriter;
|
||||
render(template: string, view: any, partials?: any): MustacheWriter;
|
||||
render(template: string, view: any, partials?: any): string;
|
||||
to_html(template: string, view: any, partials?: any, send?): string;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+348
@@ -0,0 +1,348 @@
|
||||
// Type definitions for node_redis 0.8
|
||||
// Project: https://github.com/mranney/node_redis
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
declare module 'redis' {
|
||||
export var debug_mode: bool;
|
||||
export function createClient(): RedisClient;
|
||||
export function createClient(port: number, host: string, options?: RedisOptions): RedisClient;
|
||||
export function print(err: string, reply?: string);
|
||||
|
||||
interface RedisOptions {
|
||||
parser?: string;
|
||||
return_buffers?: bool;
|
||||
detect_buffers?: bool;
|
||||
socket_nodelay?: bool;
|
||||
no_ready_check?: bool;
|
||||
enable_offline_queue?: bool;
|
||||
}
|
||||
|
||||
interface Command {
|
||||
(...args: any[]): Commands;
|
||||
}
|
||||
|
||||
interface Commands {
|
||||
|
||||
get: Command;
|
||||
set: Command;
|
||||
setnx: Command;
|
||||
setex: Command;
|
||||
append: Command;
|
||||
strlen: Command;
|
||||
del: Command;
|
||||
exists: Command;
|
||||
setbit: Command;
|
||||
getbit: Command;
|
||||
setrange: Command;
|
||||
getrange: Command;
|
||||
substr: Command;
|
||||
incr: Command;
|
||||
decr: Command;
|
||||
mget: Command;
|
||||
|
||||
rpush: Command;
|
||||
lpush: Command;
|
||||
rpushx: Command;
|
||||
lpushx: Command;
|
||||
linsert: Command;
|
||||
rpop: Command;
|
||||
lpop: Command;
|
||||
brpop: Command;
|
||||
brpoplpush: Command;
|
||||
blpop: Command;
|
||||
llen: Command;
|
||||
lindex: Command;
|
||||
lset: Command;
|
||||
lrange: Command;
|
||||
ltrim: Command;
|
||||
lrem: Command;
|
||||
rpoplpush: Command;
|
||||
|
||||
sadd: Command;
|
||||
srem: Command;
|
||||
smove: Command;
|
||||
sismember: Command;
|
||||
scard: Command;
|
||||
spop: Command;
|
||||
srandmember: Command;
|
||||
sinter: Command;
|
||||
sinterstore: Command;
|
||||
sunion: Command;
|
||||
sunionstore: Command;
|
||||
sdiff: Command;
|
||||
sdiffstore: Command;
|
||||
smembers: Command;
|
||||
|
||||
zadd: Command;
|
||||
zincrby: Command;
|
||||
zrem: Command;
|
||||
zremrangebyscore: Command;
|
||||
zremrangebyrank: Command;
|
||||
zunionstore: Command;
|
||||
zinterstore: Command;
|
||||
zrange: Command;
|
||||
zrangebyscore: Command;
|
||||
zrevrangebyscore: Command;
|
||||
zcount: Command;
|
||||
zrevrange: Command;
|
||||
zcard: Command;
|
||||
zscore: Command;
|
||||
zrank: Command;
|
||||
zrevrank: Command;
|
||||
|
||||
hset: Command;
|
||||
hsetnx: Command;
|
||||
hget: Command;
|
||||
hmset: Command;
|
||||
hmget: Command;
|
||||
hincrby: Command;
|
||||
hdel: Command;
|
||||
hlen: Command;
|
||||
hkeys: Command;
|
||||
hvals: Command;
|
||||
hgetall: Command;
|
||||
hexists: Command;
|
||||
|
||||
incrby: Command;
|
||||
decrby: Command;
|
||||
getset: Command;
|
||||
mset: Command;
|
||||
msetnx: Command;
|
||||
randomkey: Command;
|
||||
select: Command;
|
||||
move: Command;
|
||||
rename: Command;
|
||||
renamenx: Command;
|
||||
expire: Command;
|
||||
expireat: Command;
|
||||
keys: Command;
|
||||
dbsize: Command;
|
||||
auth: Command;
|
||||
ping: Command;
|
||||
echo: Command;
|
||||
save: Command;
|
||||
bgsave: Command;
|
||||
bgrewriteaof: Command;
|
||||
shutdown: Command;
|
||||
lastsave: Command;
|
||||
type: Command;
|
||||
multi: Command;
|
||||
exec: Command;
|
||||
discard: Command;
|
||||
sync: Command;
|
||||
flushdb: Command;
|
||||
flushall: Command;
|
||||
sort: Command;
|
||||
info: Command;
|
||||
monitor: Command;
|
||||
ttl: Command;
|
||||
persist: Command;
|
||||
slaveof: Command;
|
||||
debug: Command;
|
||||
config: Command;
|
||||
subscribe: Command;
|
||||
unsubscribe: Command;
|
||||
psubscribe: Command;
|
||||
punsubscribe: Command;
|
||||
publish: Command;
|
||||
watch: Command;
|
||||
unwatch: Command;
|
||||
cluster: Command;
|
||||
restore: Command;
|
||||
migrate: Command;
|
||||
dump: Command;
|
||||
object: Command;
|
||||
client: Command;
|
||||
eval: Command;
|
||||
evalsha: Command;
|
||||
|
||||
quit: Command;
|
||||
|
||||
/////////////////
|
||||
|
||||
GET: Command;
|
||||
SET: Command;
|
||||
SETNX: Command;
|
||||
SETEX: Command;
|
||||
APPEND: Command;
|
||||
STRLEN: Command;
|
||||
DEL: Command;
|
||||
EXISTS: Command;
|
||||
SETBIT: Command;
|
||||
GETBIT: Command;
|
||||
SETRANGE: Command;
|
||||
GETRANGE: Command;
|
||||
SUBSTR: Command;
|
||||
INCR: Command;
|
||||
DECR: Command;
|
||||
MGET: Command;
|
||||
|
||||
RPUSH: Command;
|
||||
LPUSH: Command;
|
||||
RPUSHX: Command;
|
||||
LPUSHX: Command;
|
||||
LINSERT: Command;
|
||||
RPOP: Command;
|
||||
LPOP: Command;
|
||||
BRPOP: Command;
|
||||
BRPOPLPUSH: Command;
|
||||
BLPOP: Command;
|
||||
LLEN: Command;
|
||||
LINDEX: Command;
|
||||
LSET: Command;
|
||||
LRANGE: Command;
|
||||
LTRIM: Command;
|
||||
LREM: Command;
|
||||
RPOPLPUSH: Command;
|
||||
|
||||
SADD: Command;
|
||||
SREM: Command;
|
||||
SMOVE: Command;
|
||||
SISMEMBER: Command;
|
||||
SCARD: Command;
|
||||
SPOP: Command;
|
||||
SRANDMEMBER: Command;
|
||||
SINTER: Command;
|
||||
SINTERSTORE: Command;
|
||||
SUNION: Command;
|
||||
SUNIONSTORE: Command;
|
||||
SDIFF: Command;
|
||||
SDIFFSTORE: Command;
|
||||
SMEMBERS: Command;
|
||||
|
||||
ZADD: Command;
|
||||
ZINCRBY: Command;
|
||||
ZREM: Command;
|
||||
ZREMRANGEBYSCORE: Command;
|
||||
ZREMRANGEBYRANK: Command;
|
||||
ZUNIONSTORE: Command;
|
||||
ZINTERSTORE: Command;
|
||||
ZRANGE: Command;
|
||||
ZRANGEBYSCORE: Command;
|
||||
ZREVRANGEBYSCORE: Command;
|
||||
ZCOUNT: Command;
|
||||
ZREVRANGE: Command;
|
||||
ZCARD: Command;
|
||||
ZSCORE: Command;
|
||||
ZRANK: Command;
|
||||
ZREVRANK: Command;
|
||||
|
||||
HSET: Command;
|
||||
HSETNX: Command;
|
||||
HGET: Command;
|
||||
HMSET: Command;
|
||||
HMGET: Command;
|
||||
HINCRBY: Command;
|
||||
HDEL: Command;
|
||||
HLEN: Command;
|
||||
HKEYS: Command;
|
||||
HVALS: Command;
|
||||
HGETALL: Command;
|
||||
HEXISTS: Command;
|
||||
|
||||
INCRBY: Command;
|
||||
DECRBY: Command;
|
||||
GETSET: Command;
|
||||
MSET: Command;
|
||||
MSETNX: Command;
|
||||
RANDOMKEY: Command;
|
||||
SELECT: Command;
|
||||
MOVE: Command;
|
||||
RENAME: Command;
|
||||
RENAMENX: Command;
|
||||
EXPIRE: Command;
|
||||
EXPIREAT: Command;
|
||||
KEYS: Command;
|
||||
DBSIZE: Command;
|
||||
AUTH: Command;
|
||||
PING: Command;
|
||||
ECHO: Command;
|
||||
SAVE: Command;
|
||||
BGSAVE: Command;
|
||||
BGREWRITEAOF: Command;
|
||||
SHUTDOWN: Command;
|
||||
LASTSAVE: Command;
|
||||
TYPE: Command;
|
||||
MULTI: Command;
|
||||
EXEC: Command;
|
||||
DISCARD: Command;
|
||||
SYNC: Command;
|
||||
FLUSHDB: Command;
|
||||
FLUSHALL: Command;
|
||||
SORT: Command;
|
||||
INFO: Command;
|
||||
MONITOR: Command;
|
||||
TTL: Command;
|
||||
PERSIST: Command;
|
||||
SLAVEOF: Command;
|
||||
DEBUG: Command;
|
||||
CONFIG: Command;
|
||||
SUBSCRIBE: Command;
|
||||
UNSUBSCRIBE: Command;
|
||||
PSUBSCRIBE: Command;
|
||||
PUNSUBSCRIBE: Command;
|
||||
PUBLISH: Command;
|
||||
WATCH: Command;
|
||||
UNWATCH: Command;
|
||||
CLUSTER: Command;
|
||||
RESTORE: Command;
|
||||
MIGRATE: Command;
|
||||
DUMP: Command;
|
||||
OBJECT: Command;
|
||||
CLIENT: Command;
|
||||
EVAL: Command;
|
||||
EVALSHA: Command;
|
||||
|
||||
QUIT: Command;
|
||||
}
|
||||
|
||||
interface Multi extends Commands {
|
||||
}
|
||||
|
||||
interface RedisClient extends Commands {
|
||||
|
||||
initialize_retry_vars(): void;
|
||||
flush_and_error(message: string): void;
|
||||
on_error(message: string): void;
|
||||
do_auth(): void;
|
||||
on_connect(): void;
|
||||
init_parser(): void;
|
||||
on_ready(): void;
|
||||
on_info_cmd(err, res): void;
|
||||
ready_check(): void;
|
||||
send_offline_queue(): void;
|
||||
connection_gone(why: string): void;
|
||||
on_data(data): void;
|
||||
return_error(err): void;
|
||||
return_reply(reply): void;
|
||||
send_command(command: string, args: any[], callback?: Function);
|
||||
send_command(command: string, ...args: any[]);
|
||||
pub_sub_command(command: { command: string; args: any[]; });
|
||||
|
||||
port: number;
|
||||
host: string;
|
||||
reply_parser;
|
||||
stream;
|
||||
|
||||
server_info;
|
||||
connected: bool;
|
||||
command_queue: any[];
|
||||
offline_queue: any[];
|
||||
retry_delay : number;
|
||||
retry_backoff: number;
|
||||
|
||||
auth(password: string, callback: Function): void;
|
||||
AUTH(password: string, callback: Function): void;
|
||||
|
||||
end(): RedisClient;
|
||||
|
||||
on(eventName: string, callback: Function): void;
|
||||
once(eventName: string, callback: Function): void;
|
||||
removeListener(eventName: string, callback: Function): void;
|
||||
|
||||
multi(): Multi;
|
||||
MULTI(): Multi;
|
||||
}
|
||||
}
|
||||
Vendored
+394
@@ -0,0 +1,394 @@
|
||||
// Type definitions for PhoneGap 2.2
|
||||
// Project: http://phonegap.com
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface Acceleration {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
timestamp: number; //DOMTimeStamp;
|
||||
}
|
||||
|
||||
interface AccelerometerOptions {
|
||||
frequency?: number;
|
||||
}
|
||||
|
||||
interface Accelerometer {
|
||||
getCurrentAcceleration(accelerometerSuccess: (acceleration: Acceleration) => void , accelerometerError: () => void ): void;
|
||||
watchAcceleration(accelerometerSuccess: (acceleration: Acceleration) => void , accelerometerError: () => void , accelerometerOptions?: AccelerometerOptions): void;
|
||||
clearWatch(watchID: number): void;
|
||||
}
|
||||
|
||||
interface CameraPopoverOptions {
|
||||
x?: number;
|
||||
y?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
arrowDir?: number;
|
||||
}
|
||||
|
||||
interface CameraOptions {
|
||||
quality?: number;
|
||||
destinationType?: number;
|
||||
sourceType?: number;
|
||||
allowEdit?: bool;
|
||||
encodingType?: number;
|
||||
targetWidth?: number;
|
||||
targetHeight?: number;
|
||||
mediaType?: number;
|
||||
correctOrientation?: bool;
|
||||
saveToPhotoAlbum?: bool;
|
||||
popoverOptions?: number;
|
||||
}
|
||||
|
||||
interface Camera {
|
||||
getPicture(cameraSuccess: (imageData: string) => void , cameraError: (message: string) => void , cameraOptions?: CameraOptions): void;
|
||||
cleanup(cameraSuccess: (imageData: string) => void , cameraError: (message: string) => void ): void;
|
||||
}
|
||||
|
||||
interface CaptureAudioOptions {
|
||||
limit?: number;
|
||||
duration?: number;
|
||||
mode?: number;
|
||||
}
|
||||
|
||||
interface MediaFile {
|
||||
name: string;
|
||||
fullPath: string;
|
||||
type: string;
|
||||
lastModifiedDate: Date;
|
||||
size: number;
|
||||
|
||||
getFormatData(successCallback: Function, errorCallback?: Function): void;
|
||||
}
|
||||
|
||||
interface CaptureError {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface Capture {
|
||||
captureAudio(captureSuccess: (mediaFiles: MediaFile[]) => void , captureError: (error: CaptureError) =>void , options?: CaptureAudioOptions);
|
||||
}
|
||||
|
||||
interface CompassOptions {
|
||||
frequency?: number;
|
||||
filter?: number;
|
||||
}
|
||||
|
||||
interface CompassHeading {
|
||||
magneticHeading?: number;
|
||||
trueHeading?: number;
|
||||
headingAccuracy?: number;
|
||||
timestamp?: number;
|
||||
}
|
||||
|
||||
interface CompassError {
|
||||
code: number;
|
||||
}
|
||||
|
||||
interface Compass {
|
||||
getCurrentHeading(compassSuccess: (heading: CompassHeading) => void , compassError: (error: CompassError) => void , compassOptions?: CompassOptions): void;
|
||||
watchHeading(compassSuccess: (heading: CompassHeading) => void , compassError: (error: CompassError) => void , compassOptions?: CompassOptions): void;
|
||||
clearWatch(watchID: number): void;
|
||||
}
|
||||
|
||||
interface Connection {
|
||||
type: number;
|
||||
}
|
||||
|
||||
interface ContactAddress {
|
||||
pref: bool;
|
||||
type: string;
|
||||
formatted: string;
|
||||
streetAddress: string;
|
||||
locality: string;
|
||||
region: string;
|
||||
postalCode: string;
|
||||
country: string;
|
||||
}
|
||||
|
||||
interface ContactField {
|
||||
type: string;
|
||||
value: string;
|
||||
pref: bool;
|
||||
}
|
||||
|
||||
interface Contact {
|
||||
id: string;
|
||||
displayName: string;
|
||||
name: ContactName;
|
||||
nickname: string;
|
||||
phoneNumbers: ContactField[];
|
||||
emails: ContactField[];
|
||||
addresses: ContactAddress[];
|
||||
ims: ContactField[];
|
||||
organizations: ContactOrganization[];
|
||||
birthday: Date;
|
||||
note: string;
|
||||
photos: ContactField[];
|
||||
categories: ContactField[];
|
||||
urls: ContactField[];
|
||||
}
|
||||
|
||||
interface ContactFindOptions {
|
||||
filter?: string;
|
||||
multiple?: bool;
|
||||
}
|
||||
|
||||
interface ContactName {
|
||||
formatted: string;
|
||||
familyName: string;
|
||||
givenName: string;
|
||||
middleName: string;
|
||||
honorificPrefix: string;
|
||||
honorificSuffix: string;
|
||||
}
|
||||
|
||||
interface ContactOrganization {
|
||||
pref: bool;
|
||||
type: string;
|
||||
name: string;
|
||||
department: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
interface ContactError {
|
||||
code: number;
|
||||
}
|
||||
|
||||
interface Contacts {
|
||||
create(properties: any): void;
|
||||
find(contactFields: string[], contactSuccess: (contacts: Contact[]) => void , contactError: (error: ContactError) => void , contactFindOptions?: ContactFindOptions): void;
|
||||
}
|
||||
|
||||
interface Device {
|
||||
name: string;
|
||||
cordova: string;
|
||||
platform: string;
|
||||
uuid: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
/* Defined in lib.d.ts
|
||||
interface File {
|
||||
fullPath: string;
|
||||
type: string;
|
||||
size: number;
|
||||
}
|
||||
*/
|
||||
|
||||
interface FileWriter {
|
||||
readyState: any;
|
||||
fileName: string;
|
||||
length: number;
|
||||
position: number;
|
||||
error: FileError;
|
||||
|
||||
onwritestart: Function;
|
||||
onprogress: Function;
|
||||
onwrite: Function;
|
||||
onabort: Function;
|
||||
onerror: Function;
|
||||
onwriteend: Function;
|
||||
|
||||
abort();
|
||||
seek();
|
||||
truncate();
|
||||
write();
|
||||
}
|
||||
|
||||
interface FileSystem {
|
||||
name: string;
|
||||
root: DirectoryEntry;
|
||||
}
|
||||
|
||||
interface FileSystemEntry {
|
||||
isFile: bool;
|
||||
isDirectory: bool;
|
||||
name: string;
|
||||
fullPath: string;
|
||||
filesystem: FileSystem;
|
||||
|
||||
getMetadata();
|
||||
setMetadata();
|
||||
toURL();
|
||||
remove();
|
||||
getParent();
|
||||
}
|
||||
|
||||
interface FileEntry extends FileSystemEntry {
|
||||
moveTo();
|
||||
copyTo();
|
||||
createWriter();
|
||||
file();
|
||||
}
|
||||
|
||||
interface DirectoryEntry extends FileSystemEntry {
|
||||
createReader();
|
||||
getDirectory();
|
||||
getFile();
|
||||
removeRecursively();
|
||||
}
|
||||
|
||||
interface DirectoryReader {
|
||||
readEntries(successCallback: (entries: FileSystemEntry) => void , errorCallback: (error: FileError) => void );
|
||||
}
|
||||
|
||||
interface FileTransfer {
|
||||
onprogress: Function;
|
||||
|
||||
upload(filePath: string, server: string, successCallback: (metadata: Metadata) => void , errorCallback: (error: FileError) => void , options: any): void;
|
||||
download(source: string, target: string, successCallback: (fileEntry: FileEntry) => void , errorCallback: (error: FileError) => void ): void;
|
||||
abort(): void;
|
||||
}
|
||||
|
||||
interface FileUploadOptions {
|
||||
fileKey?: string;
|
||||
fileName?: string;
|
||||
mimeType?: string;
|
||||
params?: any;
|
||||
chunkedMode?: bool;
|
||||
headers?: any;
|
||||
}
|
||||
|
||||
interface FileUploadResult {
|
||||
bytesSent: number;
|
||||
responseCode: number;
|
||||
response: string;
|
||||
}
|
||||
|
||||
// TODO Flags
|
||||
|
||||
interface LocalFileSystem {
|
||||
requestFileSystem: Function;
|
||||
resolveLocalFileSystemURI: Function;
|
||||
}
|
||||
|
||||
interface Metadata {
|
||||
modificationTime: Date;
|
||||
}
|
||||
|
||||
interface FileError {
|
||||
code: number;
|
||||
}
|
||||
|
||||
interface FileTransferError {
|
||||
code: number;
|
||||
source: string;
|
||||
target: string;
|
||||
http_status: number;
|
||||
}
|
||||
|
||||
interface GeolocationOptions {
|
||||
enableHighAccuracy?: bool;
|
||||
timeout?: number;
|
||||
maximumAge?: number;
|
||||
}
|
||||
|
||||
interface Geolocation {
|
||||
getCurrentPosition(geolocationSuccess: (position: Position) => void , geolocationError?: PositionErrorCallback, geolocationOptions?: GeolocationOptions): void;
|
||||
watchPosition(geolocationSuccess: (position: Position) => void , geolocationError?: PositionErrorCallback, geolocationOptions?: GeolocationOptions): void;
|
||||
clearWatch(watchID: number): void;
|
||||
}
|
||||
|
||||
interface GlobalizationError {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface Globalization {
|
||||
getPreferredLanguage(successCB, errorCB): void;
|
||||
getLocaleName(successCB, errorCB): void;
|
||||
dateToString(date, successCB, errorCB, options): void;
|
||||
stringToDate(dateString, successCB, errorCB, options): void;
|
||||
getDatePattern(successCB, errorCB, options): void;
|
||||
getDateNames(successCB, errorCB, options): void;
|
||||
isDayLightSavingsTime(date, successCB, errorCB): void;
|
||||
getFirstDayOfWeek(successCB, errorCB): void;
|
||||
numberToString(number, successCB, errorCB, options): void;
|
||||
stringToNumber(string, successCB, errorCB, options): void;
|
||||
getNumberPattern(successCB, errorCB, options): void;
|
||||
getCurrencyPattern(currencyCode, successCB, errorCB): void;
|
||||
}
|
||||
|
||||
interface Media {
|
||||
new (src: string, mediaSuccess: Function, mediaError?: MediaError, mediaStatus?: Function);
|
||||
getCurrentPosition(mediaSuccess: Function, mediaError?: MediaError): void;
|
||||
getDuration(): void;
|
||||
play(): void;
|
||||
pause(): void;
|
||||
release(): void;
|
||||
seekTo(milliseconds: number): void;
|
||||
startRecord(): void;
|
||||
stopRecord(): void;
|
||||
stop(): void;
|
||||
}
|
||||
|
||||
interface Notification {
|
||||
alert(message: string, alertCallback: Function, title?: string, buttonName?: string): void;
|
||||
confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string): void;
|
||||
beep(times: number): void;
|
||||
vibrate(milliseconds: number): void;
|
||||
}
|
||||
|
||||
interface Splashscreen {
|
||||
show(): void;
|
||||
hide(): void;
|
||||
}
|
||||
|
||||
interface Database {
|
||||
transaction();
|
||||
changeVersion();
|
||||
}
|
||||
|
||||
interface SQLResultSetRowList {
|
||||
length: number;
|
||||
item(index: number): any;
|
||||
}
|
||||
|
||||
interface SQLError {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface SQLResultSet {
|
||||
insertId: number;
|
||||
rowsAffected: number;
|
||||
rows: SQLResultSetRowList;
|
||||
}
|
||||
|
||||
interface SQLTransaction {
|
||||
executeSql(sql: string): SQLResultSet;
|
||||
}
|
||||
|
||||
/* Defined in lib.d.ts
|
||||
|
||||
interface LocalStorage {
|
||||
key;
|
||||
getItem;
|
||||
setItem;
|
||||
removeItem;
|
||||
clear;
|
||||
}
|
||||
*/
|
||||
|
||||
interface Navigator {
|
||||
accelerometer: Accelerometer;
|
||||
camera: Camera;
|
||||
capture: Capture;
|
||||
compass: Compass;
|
||||
connection: Connection;
|
||||
contacts: Contacts;
|
||||
device: Device;
|
||||
geolocation: Geolocation;
|
||||
globalization: Globalization;
|
||||
notification: Notification;
|
||||
splashscreen: Splashscreen;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
openDatabase(database_name: string, database_version: string, database_displayname: string, database_size: number): Database;
|
||||
}
|
||||
Vendored
+77
@@ -0,0 +1,77 @@
|
||||
// Type definitions for PreloadJS 0.2
|
||||
// Project: http://www.createjs.com/#!/PreloadJS
|
||||
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
module createjs {
|
||||
export class AbstractLoader {
|
||||
// properties
|
||||
canceled: bool;
|
||||
loaded: bool;
|
||||
progress: number;
|
||||
|
||||
// methods
|
||||
cancel(): void;
|
||||
getItem(): Object;
|
||||
load(): void;
|
||||
|
||||
// events
|
||||
onComplete: () => any;
|
||||
onError: () => any;
|
||||
onFileLoad: () => any;
|
||||
onFileProgress: () => any;
|
||||
onLoadStart: () => any;
|
||||
onProgress: () => any;
|
||||
}
|
||||
|
||||
|
||||
export class PreloadJS extends AbstractLoader {
|
||||
constructor (useXHR2?: bool);
|
||||
|
||||
// properties
|
||||
static CSS: string;
|
||||
static IMAGE: string;
|
||||
static JAVASCRIPT: string;
|
||||
static JSON: string;
|
||||
maintainScriptOrder: bool;
|
||||
next: PreloadJS;
|
||||
static SOUND: string;
|
||||
stopOnError: bool;
|
||||
static TEXT: string;
|
||||
static TIMEOUT_TIME: number;
|
||||
useXHR: bool;
|
||||
static XML: string;
|
||||
|
||||
// methods
|
||||
BrowserDetect(): Object;
|
||||
close(): void;
|
||||
getResult(value: string): Object;
|
||||
initialize(useXHR: bool): void;
|
||||
installPlugin(plugin: () => any): void;
|
||||
load(): void;
|
||||
loadFile(file: Object, loadNow: bool): void;
|
||||
loadFile(file: string, loadNow: bool): void;
|
||||
loadManifest(manifest: Object[], loadNow: bool): void;
|
||||
loadManifest(manifest: string[], loadNow: bool): void;
|
||||
setMaxConnections(value: number): void;
|
||||
setPaused(value: bool): void;
|
||||
}
|
||||
|
||||
|
||||
export class TagLoader extends AbstractLoader {
|
||||
constructor (item: Object, srcAttr: string, useXHR: bool);
|
||||
constructor (item: string, srcAttr: string, useXHR: bool);
|
||||
}
|
||||
|
||||
|
||||
export class XHRLoader extends AbstractLoader {
|
||||
constructor (file: Object);
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Diullei Gomes <https://github.com/diullei>
|
||||
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface DoneCallbackObject {
|
||||
failed: number;
|
||||
passed: number;
|
||||
|
||||
Vendored
+246
@@ -0,0 +1,246 @@
|
||||
// Type definitions for Sammy.js
|
||||
// Project: http://sammyjs.org/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="jquery-1.8.d.ts"/>
|
||||
|
||||
module Sammy {
|
||||
export function (): Sammy.Application;
|
||||
export function (selector: string): Sammy.Application;
|
||||
export function (handler: Function): Sammy.Application;
|
||||
export function (selector: string, handler: Function): Sammy.Application;
|
||||
|
||||
export function Cache(app, options);
|
||||
export function DataCacheProxy(initial, $element);
|
||||
export function DataLocationProxy(app, data_name, href_attribute);
|
||||
export function DefaultLocationProxy(app, run_interval_every);
|
||||
export function EJS(app, method_alias);
|
||||
|
||||
export function Exceptional(app, errorReporter);
|
||||
export function Flash(app);
|
||||
export function Form(app); // formFor ( name, object, content_callback )
|
||||
|
||||
export function Haml(app, method_alias);
|
||||
export function Handlebars(app, method_alias);
|
||||
export function Hogan(app, method_alias);
|
||||
export function Hoptoad(app, errorReporter);
|
||||
export function JSON(app);
|
||||
export function Meld(app, method_alias);
|
||||
export function MemoryCacheProxy(initial);
|
||||
export function Mustache(app, method_alias);
|
||||
export function NestedParams(app);
|
||||
export function OAuth2(app);
|
||||
export function PathLocationProxy(app);
|
||||
export function Pure(app, method_alias);
|
||||
export function PushLocationProxy(app);
|
||||
export function Session(app, options);
|
||||
export function Storage(app);
|
||||
|
||||
export function Title();
|
||||
export function Tmpl(app, method_alias);
|
||||
export function addLogger(logger);
|
||||
export function log();
|
||||
|
||||
export interface Object {
|
||||
|
||||
new (obj: any);
|
||||
|
||||
escapeHTML(s: string): string;
|
||||
h(s: string): string;
|
||||
|
||||
has(key: string): bool;
|
||||
join(...args: any[]): string;
|
||||
keys(attributes_only?: bool): string[];
|
||||
log(...args: any[]): void;
|
||||
toHTML(): string;
|
||||
toHash(): any;
|
||||
toString(include_functions?: bool): string;
|
||||
}
|
||||
|
||||
export interface Application extends Object {
|
||||
|
||||
ROUTE_VERBS: string[];
|
||||
APP_EVENTS: string[];
|
||||
|
||||
(appFn: Function);
|
||||
|
||||
$element(selector?: string): JQuery;
|
||||
after(callback: Function): Application;
|
||||
any(verb: string, path: string, callback: Function): void;
|
||||
route(verb: string, path: string, callback: Function): void;
|
||||
around(callback: Function): Application;
|
||||
before(options: any, callback: Function): Application;
|
||||
bind(name: string, callback: Function): Application;
|
||||
bind(name: string, data: any, callback: Function): Application;
|
||||
bindToAllEvents(callback: Function): Application;
|
||||
clearTemplateCache(): any;
|
||||
contextMatchesOptions(context: any, match_options: any, positive?: bool): bool;
|
||||
del(path: string, callback: Function): Application;
|
||||
del(path: RegExp, callback: Function): Application;
|
||||
destroy(): Application;
|
||||
error(message: string, original_error: Error): void;
|
||||
eventNamespace(): string;
|
||||
get(path: string, callback: Function): Application;
|
||||
get(path: RegExp, callback: Function): Application;
|
||||
getLocation(): string;
|
||||
helper(name: string, method: Function): Application;
|
||||
helpers(extensions: any): Application;
|
||||
isRunning(): bool;
|
||||
log(...params: any[]): void;
|
||||
lookupRoute(verb: string, path: string): any;
|
||||
mapRoutes(route_array: any[]): Application;
|
||||
notFound(verb: string, path: string): any;
|
||||
post(path: string, callback: Function): Application;
|
||||
post(path: RegExp, callback: Function): Application;
|
||||
put(path: string, callback: Function): Application;
|
||||
put(path: RegExp, callback: Function): Application;
|
||||
refresh(): Application;
|
||||
routablePath(path: string): string;
|
||||
route(verb: string, path: string, callback: Function): Application;
|
||||
route(verb: string, path: RegExp, callback: Function): Application;
|
||||
run(start_url?: string): Application;
|
||||
runRoute(verb: string, path: string, params: any, target: any): any;
|
||||
setLocation(new_location: string): string;
|
||||
setLocationProxy(new_proxy: DataLocationProxy): void;
|
||||
swap(content: any, callback: Function): string;
|
||||
templateCache(key: string, value: any): any;
|
||||
toString(): string;
|
||||
trigger(name: string, data?: any): Application;
|
||||
unload(): Application;
|
||||
use(...params: any[]): void;
|
||||
}
|
||||
|
||||
export interface DataLocationProxy {
|
||||
|
||||
new (app, run_interval_every): DataLocationProxy;
|
||||
|
||||
fullPath(location_obj): string;
|
||||
bind(): void;
|
||||
unbind(): void;
|
||||
setLocation(new_location: string): string;
|
||||
_startPolling(every: number): void;
|
||||
}
|
||||
|
||||
export interface EventContext extends Object {
|
||||
|
||||
new (app, verb, path, params, target);
|
||||
|
||||
$element(): JQuery;
|
||||
engineFor(engine: any): any;
|
||||
eventNamespace(): string;
|
||||
interpolate(content: any, data: any, engine: any, partials): EventContext;
|
||||
json(str: string): any;
|
||||
load(location: any, options?: any, callback?: Function): any;
|
||||
loadPartials(partials);
|
||||
notFound(): any;
|
||||
partial(location: string, data: any, callback: Function, partials): RenderContext;
|
||||
redirect(...params: any[]): void;
|
||||
render(location: string, data: any, callback: Function, partials): RenderContext;
|
||||
renderEach(location: any, name?: string, data?: any, callback?: Function): RenderContext;
|
||||
send(...params: any[]): RenderContext;
|
||||
swap(contents: any, callback: Function): string;
|
||||
toString(): string;
|
||||
trigger(name: string, data?: any): EventContext;
|
||||
}
|
||||
|
||||
export interface FormBuilder {
|
||||
|
||||
new (name, object);
|
||||
|
||||
checkbox(keypath: string, value: any, ...attributes: any[]): string;
|
||||
close(): string;
|
||||
hidden(keypath: string, ...attributes: any[]): string;
|
||||
label(keypath: string, content: any, ...attributes: any[]): string;
|
||||
open(...attributes: any[]);
|
||||
password(keypath: string, ...attributes: any[]): string;
|
||||
radio(keypath: string, value: any, ...attributes: any[]): string;
|
||||
select(keypath: string, options: any, ...attributes: any[]): string;
|
||||
submit(...attributes: any[]): string;
|
||||
text(keypath: string, ...attributes: any[]): string;
|
||||
textarea(keypath: string, ...attributes: any[]): string;
|
||||
}
|
||||
|
||||
export interface Form {
|
||||
formFor(name: string, object: any, content_callback: Function): FormBuilder;
|
||||
}
|
||||
|
||||
export interface GoogleAnalytics {
|
||||
|
||||
new (app, tracker);
|
||||
|
||||
noTrack();
|
||||
track(path);
|
||||
}
|
||||
|
||||
export interface RenderContext extends Object {
|
||||
|
||||
new (event_context);
|
||||
|
||||
appendTo(selector: string): RenderContext;
|
||||
collect(array: any[], callback: Function, now?: bool): RenderContext;
|
||||
interpolate(data: any, engine?: any, retain?: bool): RenderContext;
|
||||
load(location: string, options?: any, callback?: Function): RenderContext;
|
||||
loadPartials(partials?: any): RenderContext;
|
||||
next(content: any): void;
|
||||
partial(location: string, callback: Function, partials): RenderContext;
|
||||
partial(location: string, data: any, callback: Function, partials): RenderContext;
|
||||
prependTo(selector: string): RenderContext;
|
||||
render(callback: Function): RenderContext;
|
||||
render(location: string, data: any): RenderContext;
|
||||
render(location: string, callback: Function, partials?: any): RenderContext;
|
||||
render(location: string, data: any, callback: Function): RenderContext;
|
||||
render(location: string, data: any, callback: Function, partials: any): RenderContext;
|
||||
renderEach(location: string, name: string, data: any, callback: Function): RenderContext;
|
||||
replace(selector: string): RenderContext;
|
||||
send(...params: any[]): RenderContext;
|
||||
swap(callback: Function): RenderContext;
|
||||
then(callback: Function): RenderContext;
|
||||
trigger(name, data);
|
||||
wait(): void;
|
||||
}
|
||||
|
||||
|
||||
export interface StoreOptions {
|
||||
name?: string;
|
||||
element?: string;
|
||||
type?: string;
|
||||
memory?: any;
|
||||
data?: any;
|
||||
cookie?: any;
|
||||
local?: any;
|
||||
session?: any;
|
||||
}
|
||||
|
||||
export interface Store {
|
||||
|
||||
stores: any;
|
||||
|
||||
new (options);
|
||||
|
||||
clear(key: string): any;
|
||||
clearAll(): void;
|
||||
each(callback: Function): bool;
|
||||
exists(key: string): bool;
|
||||
fetch(key: string, callback: Function): any;
|
||||
filter(callback: Function): bool;
|
||||
first(callback: Function): bool;
|
||||
get(key: string): any;
|
||||
isAvailable(): bool;
|
||||
keys(): string[];
|
||||
load(key: string, path: string, callback: Function): void;
|
||||
set(key: string, value: any): any;
|
||||
|
||||
Cookie(name, element, options);
|
||||
Data(name, element);
|
||||
LocalStorage(name, element);
|
||||
Memory(name, element);
|
||||
SessionStorage(name, element);
|
||||
isAvailable(type);
|
||||
Template(app, method_alias);
|
||||
}
|
||||
}
|
||||
interface JQueryStatic {
|
||||
sammy: Sammy;
|
||||
}
|
||||
Vendored
+107
@@ -0,0 +1,107 @@
|
||||
// Type definitions for SoundJS 0.3
|
||||
// Project: http://www.createjs.com/#!/SoundJS
|
||||
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
module createjs {
|
||||
export class FlashPlugin {
|
||||
// properties
|
||||
static BASE_PATH: string;
|
||||
static capabilities: Object;
|
||||
showOutput: bool;
|
||||
|
||||
// methods
|
||||
create(src: string): SoundInstance;
|
||||
static generateCapabilities(): void;
|
||||
static isSupported(): bool;
|
||||
register(src: string, instances: number): Object;
|
||||
}
|
||||
|
||||
export class HTMLAudioPlugin {
|
||||
// properties
|
||||
static capabilities: Object;
|
||||
static MAX_INSTANCES: number;
|
||||
|
||||
// methods
|
||||
create(src: string): SoundInstance;
|
||||
static generateCapabilities(): void;
|
||||
static isSupported(): bool;
|
||||
register(src: string, instances: number): Object;
|
||||
}
|
||||
|
||||
export class SoundInstance {
|
||||
constructor (src: string);
|
||||
|
||||
// properties
|
||||
muted: bool;
|
||||
owner: HTMLAudioPlugin;
|
||||
paused: bool;
|
||||
playState: string;
|
||||
src: string;
|
||||
uniqueId: any; //HERE string or number
|
||||
|
||||
// methods
|
||||
getDuration(): number;
|
||||
getPan(): number;
|
||||
getPosition(): number;
|
||||
getVolume(): number;
|
||||
mute(isMuted: bool): bool;
|
||||
pause(): bool;
|
||||
play(interrupt: string, delay: number, offset: number, loop: number, volume: number, pan: number): void;
|
||||
resume(): bool;
|
||||
setPan(value: number): number;
|
||||
setPosition(value: number): void;
|
||||
setVolume(value: number): bool;
|
||||
stop(): bool;
|
||||
|
||||
// events
|
||||
onComplete: () => any;
|
||||
onLoop: () => any;
|
||||
onPlayFailed: () => any;
|
||||
onPlayInterrupted: () => any;
|
||||
onReady: () => any;
|
||||
}
|
||||
|
||||
|
||||
export class SoundJS {
|
||||
// properties
|
||||
static activePlugin: Object;
|
||||
static AUDIO_TIMEOUT: number;
|
||||
static DELIMITER: string;
|
||||
static INTERRUPT_ANY: string;
|
||||
static INTERRUPT_EARLY: string;
|
||||
static INTERRUPT_LATE: string;
|
||||
static INTERRUPT_NONE: string;
|
||||
static muted: bool;
|
||||
static PLAY_FAILED: string;
|
||||
static PLAY_FINISHED: string;
|
||||
static PLAY_INITED: string;
|
||||
static PLAY_INTERRUPTED: string;
|
||||
static PLAY_SUCCEEDED: string;
|
||||
|
||||
// methods
|
||||
static checkPlugin(initializeDefault: bool): bool;
|
||||
static getCapabilities(): Object;
|
||||
static getCapability(key: string): any; //HERE can return string | number | bool
|
||||
static getInstanceById(uniqueId: string): SoundInstance;
|
||||
static getMasterVolume(): number;
|
||||
static getSrcFromId(value: string): string;
|
||||
static isReady(): bool;
|
||||
static pause(id: string): void;
|
||||
static play(value: string, interrupt?: string, delay?: number, offset?: number, loop?: number, volume?: number, pan?: number): SoundInstance;
|
||||
static registerPlugin(plugin: Object): bool;
|
||||
static registerPlugins(plugins: Object[]): bool;
|
||||
static resume(id: string): void;
|
||||
static setMasterVolume(value: number): bool;
|
||||
static setMute(isMuted: bool, id: string): bool;
|
||||
static setVolume(value: number, id?: string): bool;
|
||||
static stop(id?: string): bool;
|
||||
}
|
||||
}
|
||||
Vendored
+2
@@ -1,7 +1,9 @@
|
||||
// Type definitions for Spin.js 1.2
|
||||
// Project: http://fgnass.github.com/spin.js/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface SpinnerOptions {
|
||||
lines?: number; // The number of lines to draw
|
||||
length?: number; // The length of each line
|
||||
|
||||
Vendored
+4042
File diff suppressed because it is too large
Load Diff
Vendored
+681
@@ -0,0 +1,681 @@
|
||||
/**
|
||||
* TeeChart(tm) for TypeScript
|
||||
*
|
||||
* v1.3 October 2012
|
||||
* Copyright(c) 2012 by Steema Software SL. All Rights Reserved.
|
||||
* http://www.steema.com
|
||||
*
|
||||
* Licensed with commercial and non-commercial attributes,
|
||||
* specifically: http://www.steema.com/licensing/html5
|
||||
*
|
||||
* TypeScript is a Microsoft product: www.typescriptlang.org
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:david@steema.com">Steema Software</a>
|
||||
* @version 1.3
|
||||
*/
|
||||
|
||||
|
||||
/// <reference path="lib.d.ts" />
|
||||
|
||||
module Tee {
|
||||
|
||||
interface IPoint {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
interface IRectangle {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
contains(point: IPoint): bool;
|
||||
}
|
||||
|
||||
interface ITool {
|
||||
active: bool;
|
||||
chart: IChart;
|
||||
|
||||
mousedown(event): bool;
|
||||
mousemove(event): bool;
|
||||
clicked(p:IPoint): bool;
|
||||
draw(): void;
|
||||
}
|
||||
|
||||
interface IGradient {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
|
||||
colors: string[];
|
||||
direction: string;
|
||||
stops: number[];
|
||||
offset: IPoint;
|
||||
}
|
||||
|
||||
interface IShadow {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
blur:number;
|
||||
color: string;
|
||||
width:number;
|
||||
height:number;
|
||||
}
|
||||
|
||||
interface IStroke {
|
||||
chart: IChart;
|
||||
fill: string;
|
||||
size: number;
|
||||
join: string;
|
||||
cap: string;
|
||||
dash: number[];
|
||||
gradient: IGradient;
|
||||
}
|
||||
|
||||
interface IFont {
|
||||
chart: IChart;
|
||||
style: string;
|
||||
gradient: IGradient;
|
||||
fill: string;
|
||||
stroke: IStroke;
|
||||
shadow: IShadow;
|
||||
textAlign: string;
|
||||
baseLine: string;
|
||||
|
||||
getSize():number;
|
||||
setSize(size:number):void;
|
||||
}
|
||||
|
||||
interface IImage {
|
||||
url: string;
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
}
|
||||
|
||||
interface IFormat {
|
||||
font: IFont;
|
||||
gradient: IGradient;
|
||||
shadow: IShadow;
|
||||
stroke: IStroke;
|
||||
round: IPoint;
|
||||
transparency: number;
|
||||
image: IImage;
|
||||
fill: string;
|
||||
|
||||
textHeight(text:string): number;
|
||||
textWidth(text:string): number;
|
||||
drawText(bounds:IRectangle, text:string);
|
||||
rectangle(x:number, y:number, width:number, height:number);
|
||||
poligon(points:IPoint[]);
|
||||
ellipse(x:number, y:number, width:number, height:number);
|
||||
}
|
||||
|
||||
interface IMargins {
|
||||
left: number;
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
}
|
||||
|
||||
interface IAnnotation extends ITool {
|
||||
position: IPoint;
|
||||
margins: IMargins;
|
||||
items: IAnnotation[];
|
||||
bounds: IRectangle;
|
||||
visible: bool;
|
||||
transparent: bool;
|
||||
text: string;
|
||||
format: IFormat;
|
||||
|
||||
add(text: string): IAnnotation;
|
||||
resize(): void;
|
||||
clicked(point: IPoint): bool;
|
||||
draw(): void;
|
||||
}
|
||||
|
||||
interface IPanel {
|
||||
format: IFormat;
|
||||
transparent: bool;
|
||||
margins: IMargins;
|
||||
}
|
||||
|
||||
interface ITitle extends IAnnotation {
|
||||
expand: bool;
|
||||
padding: number;
|
||||
transparent: bool;
|
||||
}
|
||||
|
||||
interface IPalette {
|
||||
colors: string[];
|
||||
|
||||
get(index: number): string;
|
||||
}
|
||||
|
||||
interface IArrow extends IFormat {
|
||||
length: number;
|
||||
underline: bool;
|
||||
}
|
||||
|
||||
interface IMarks extends IAnnotation {
|
||||
arrow: IArrow;
|
||||
series: ISeries;
|
||||
|
||||
style: string;
|
||||
|
||||
drawEvery: number;
|
||||
visible: bool;
|
||||
}
|
||||
|
||||
interface ISeriesData {
|
||||
values: number[];
|
||||
labels: string[];
|
||||
source: any;
|
||||
}
|
||||
|
||||
interface ICursor {
|
||||
cursor: string;
|
||||
}
|
||||
|
||||
interface ISeries {
|
||||
data: ISeriesData;
|
||||
marks: IMarks;
|
||||
|
||||
yMandatory: bool;
|
||||
horizAxis: string;
|
||||
vertAxis: string;
|
||||
|
||||
format: IFormat;
|
||||
hover: IFormat;
|
||||
|
||||
visible: bool;
|
||||
|
||||
cursor: ICursor;
|
||||
over: number;
|
||||
|
||||
palette: IPalette;
|
||||
colorEach: string;
|
||||
|
||||
useAxes: bool;
|
||||
decimals: number;
|
||||
|
||||
title: string;
|
||||
|
||||
//refresh(failure: function): void;
|
||||
|
||||
toPercent(index: number): string;
|
||||
markText(index: number): string;
|
||||
|
||||
valueText(index: number): string;
|
||||
|
||||
associatedToAxis(axis: IAxis): bool;
|
||||
|
||||
bounds(rectangle: IRectangle): void;
|
||||
|
||||
calc(index: number, position: IPoint): void;
|
||||
|
||||
clicked(position: IPoint): number;
|
||||
|
||||
minXValue(): number;
|
||||
maxXValue(): number;
|
||||
|
||||
minYValue(): number;
|
||||
maxYValue(): number;
|
||||
|
||||
count(): number;
|
||||
|
||||
addRandom(count: number, range?: number, x?: bool): ISeries;
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface IAxisLabels {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
decimals: number;
|
||||
padding: number;
|
||||
separation: number; // %
|
||||
visible: bool;
|
||||
rotation: number;
|
||||
alternate: bool;
|
||||
maxWidth: number;
|
||||
|
||||
labelStyle: string;
|
||||
dateFormat: string;
|
||||
|
||||
getLabel(value: number): string;
|
||||
width(value: number): number;
|
||||
|
||||
}
|
||||
|
||||
interface IGrid {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
visible: bool;
|
||||
lineDash: bool;
|
||||
}
|
||||
|
||||
interface ITicks {
|
||||
chart: IChart;
|
||||
stroke: IStroke;
|
||||
visible: bool;
|
||||
length: number;
|
||||
}
|
||||
|
||||
interface IMinorTicks extends ITicks {
|
||||
count: number;
|
||||
}
|
||||
|
||||
interface IAxisTitle extends IAnnotation {
|
||||
padding: number;
|
||||
transparent: bool;
|
||||
}
|
||||
|
||||
interface IAxis {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
inverted: bool;
|
||||
|
||||
horizontal: bool; // readonly
|
||||
otherSize: bool; // readonly
|
||||
bounds: IRectangle; // readonly?
|
||||
|
||||
position: number;
|
||||
format: IFormat;
|
||||
custom: bool; // readonly
|
||||
|
||||
grid: IGrid;
|
||||
labels: IAxisLabels;
|
||||
ticks: ITicks;
|
||||
minorTicks: IMinorTicks;
|
||||
innerTicks: ITicks;
|
||||
|
||||
title: IAxisTitle;
|
||||
|
||||
automatic: bool;
|
||||
minimum: number;
|
||||
maximum: number;
|
||||
increment: number;
|
||||
log: bool;
|
||||
|
||||
startPos: number;
|
||||
endPos: number;
|
||||
|
||||
start: number; // %
|
||||
end: number; // %
|
||||
|
||||
axisSize: number;
|
||||
|
||||
scale: number;
|
||||
increm: number;
|
||||
|
||||
calc(value: number): number;
|
||||
fromPos(position: number): number;
|
||||
fromSize(size: number): number;
|
||||
|
||||
hasAnySeries(): bool;
|
||||
scroll(delta: number): void;
|
||||
setMinMax(minimum: number, maximum: number): void;
|
||||
}
|
||||
|
||||
interface IAxes {
|
||||
chart: IChart;
|
||||
visible: bool;
|
||||
|
||||
left: IAxis;
|
||||
top: IAxis;
|
||||
right: IAxis;
|
||||
bottom: IAxis;
|
||||
|
||||
items: IAxis[];
|
||||
|
||||
add(horizontal: bool, otherSide: bool): IAxis;
|
||||
//each(f: function): void;
|
||||
}
|
||||
|
||||
interface ISymbol {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
width: number;
|
||||
height: number;
|
||||
padding: number;
|
||||
visible: bool;
|
||||
}
|
||||
|
||||
interface ILegend {
|
||||
chart: IChart;
|
||||
|
||||
transparent: bool;
|
||||
|
||||
format: IFormat;
|
||||
title: IAnnotation;
|
||||
|
||||
bounds: IRectangle;
|
||||
position: string;
|
||||
visible: bool;
|
||||
inverted: bool;
|
||||
padding: number;
|
||||
align: number;
|
||||
|
||||
fontColor: bool;
|
||||
|
||||
dividing: IStroke;
|
||||
over: number;
|
||||
symbol: ISymbol;
|
||||
|
||||
itemHeight: number;
|
||||
innerOff: number;
|
||||
|
||||
legendStyle: string;
|
||||
textStyle: string;
|
||||
|
||||
availRows(): number;
|
||||
itemsCount(): number;
|
||||
totalWidth(): number;
|
||||
showValues(): bool;
|
||||
itemText(series: ISeries, index: number): string;
|
||||
isVertical(): bool;
|
||||
}
|
||||
|
||||
interface IScroll {
|
||||
chart: IChart;
|
||||
active: bool;
|
||||
enabled: bool;
|
||||
direction: string;
|
||||
mouseButton: number;
|
||||
|
||||
position: IPoint;
|
||||
}
|
||||
|
||||
interface ISeriesList {
|
||||
chart: IChart;
|
||||
items: ISeries[];
|
||||
|
||||
anyUsesAxes(): bool;
|
||||
clicked(position: IPoint): bool;
|
||||
//each(f: function): void;
|
||||
firstVisible(): ISeries;
|
||||
|
||||
}
|
||||
|
||||
interface ITools {
|
||||
chart: IChart;
|
||||
items: ITool[];
|
||||
|
||||
add(tool: ITool): ITool;
|
||||
}
|
||||
|
||||
interface IWall {
|
||||
format: IFormat;
|
||||
visible: bool;
|
||||
bounds: IRectangle;
|
||||
}
|
||||
|
||||
interface IWalls {
|
||||
visible: bool;
|
||||
left: IWall;
|
||||
right: IWall;
|
||||
bottom: IWall;
|
||||
back: IWall;
|
||||
}
|
||||
|
||||
interface IZoom {
|
||||
chart: IChart;
|
||||
active: bool;
|
||||
direction: string;
|
||||
enabled: bool;
|
||||
mouseButton: number;
|
||||
format: IFormat;
|
||||
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
interface IChart {
|
||||
addSeries(series:ISeries): ISeries;
|
||||
draw(context?:CanvasRenderingContext2D);
|
||||
}
|
||||
|
||||
// SERIES
|
||||
|
||||
interface ICustomBar extends ISeries {
|
||||
sideMargins: number;
|
||||
useOrigin: bool;
|
||||
origin: number;
|
||||
|
||||
offset: number;
|
||||
barSize: number;
|
||||
barStyle: string;
|
||||
|
||||
stacked: string;
|
||||
}
|
||||
|
||||
interface ISeriesPointer {
|
||||
chart: IChart;
|
||||
format: IFormat;
|
||||
visible: bool;
|
||||
colorEach: bool;
|
||||
style: string;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface ICustomSeries extends ISeries {
|
||||
pointer: ISeriesPointer;
|
||||
|
||||
stacked: string;
|
||||
stairs: bool;
|
||||
}
|
||||
|
||||
interface ILine extends ICustomSeries {
|
||||
smooth: number;
|
||||
}
|
||||
|
||||
interface ISmoothLine extends ILine {
|
||||
smooth: number;
|
||||
}
|
||||
|
||||
interface IArea extends ISeries {
|
||||
useOrigin: bool;
|
||||
origin: number;
|
||||
}
|
||||
|
||||
interface IPie extends ISeries {
|
||||
donut: number;
|
||||
rotation: number;
|
||||
sort: string;
|
||||
orderAscending: bool;
|
||||
explode: number[];
|
||||
concentric: bool;
|
||||
|
||||
calcPos(angle: number, position: IPoint): void;
|
||||
}
|
||||
|
||||
interface IBubbleData extends ISeriesData {
|
||||
radius: number[];
|
||||
}
|
||||
|
||||
interface IBubble extends ICustomSeries {
|
||||
data: IBubbleData;
|
||||
}
|
||||
|
||||
interface IGanttData extends ISeriesData {
|
||||
start: number[];
|
||||
x: number[];
|
||||
end: number[];
|
||||
}
|
||||
|
||||
interface IGantt extends ISeries {
|
||||
data: IGanttData;
|
||||
dateFormat: string;
|
||||
colorEach: string;
|
||||
height: number;
|
||||
margin: IPoint;
|
||||
|
||||
add(index: number, label: string, start: number, end: number): void;
|
||||
bounds(index: number, rectangle: IRectangle): void;
|
||||
}
|
||||
|
||||
interface ICandleData extends ISeriesData {
|
||||
open: number[];
|
||||
close: number[];
|
||||
high: number[];
|
||||
low: number[];
|
||||
}
|
||||
|
||||
interface ICandle extends ICustomSeries {
|
||||
data: ICandleData;
|
||||
higher: IFormat;
|
||||
lower: IFormat;
|
||||
style: string;
|
||||
}
|
||||
|
||||
// TOOLS
|
||||
|
||||
interface IDragTool extends ITool {
|
||||
series: ISeries;
|
||||
}
|
||||
|
||||
interface ICursorTool extends ITool {
|
||||
direction: string;
|
||||
size: IPoint;
|
||||
|
||||
followMouse: bool;
|
||||
dragging: number;
|
||||
|
||||
format: IFormat;
|
||||
|
||||
horizAxis: IAxis;
|
||||
vertAxis: IAxis;
|
||||
|
||||
render: string;
|
||||
|
||||
over(point: IPoint): bool;
|
||||
setRender(render: string): void;
|
||||
}
|
||||
|
||||
interface IToolTip extends IAnnotation {
|
||||
animated: number;
|
||||
autoHide: bool;
|
||||
autoRedraw: bool;
|
||||
currentSeries: ISeries;
|
||||
currentIndex: number;
|
||||
delay: number;
|
||||
|
||||
hide(): void;
|
||||
refresh(series: ISeries, index: number): void;
|
||||
}
|
||||
|
||||
declare class Point implements IPoint {
|
||||
public x:number;
|
||||
public y:number;
|
||||
}
|
||||
|
||||
declare class Chart implements IChart {
|
||||
//public aspect: IAspect;
|
||||
|
||||
public axes: IAxes;
|
||||
public footer: ITitle;
|
||||
public legend: ILegend;
|
||||
public panel: IPanel;
|
||||
public scroll: IScroll;
|
||||
public series: ISeriesList;
|
||||
public title: ITitle;
|
||||
public tools: ITools;
|
||||
public walls: IWalls;
|
||||
public zoom: IZoom;
|
||||
|
||||
public bounds: IRectangle;
|
||||
public canvas: HTMLCanvasElement;
|
||||
public chartRect: IRectangle;
|
||||
public palette: IPalette;
|
||||
|
||||
constructor(canvas: string);
|
||||
addSeries(series: ISeries): ISeries;
|
||||
getSeries(index: number): ISeries;
|
||||
removeSeries(series:ISeries): void;
|
||||
|
||||
draw(context?:CanvasRenderingContext2D);
|
||||
toImage(image: HTMLImageElement, format:string, quality:number): void;
|
||||
}
|
||||
|
||||
// SERIES
|
||||
|
||||
declare var Line: {
|
||||
prototype: ILine;
|
||||
new(values?:number[]): ILine;
|
||||
}
|
||||
|
||||
declare var PointXY: {
|
||||
prototype: ICustomSeries;
|
||||
new(values?:number[]): ICustomSeries;
|
||||
}
|
||||
|
||||
declare var Area: {
|
||||
prototype: IArea;
|
||||
new(values?:number[]): IArea;
|
||||
}
|
||||
|
||||
declare var HorizArea: {
|
||||
prototype: IArea;
|
||||
new(values?:number[]): IArea;
|
||||
}
|
||||
|
||||
declare var Bar: {
|
||||
prototype: ICustomBar;
|
||||
new(values?:number[]): ICustomBar;
|
||||
}
|
||||
|
||||
declare var HorizBar: {
|
||||
prototype: ICustomBar;
|
||||
new(values?:number[]): ICustomBar;
|
||||
}
|
||||
|
||||
declare var Pie: {
|
||||
prototype: IPie;
|
||||
new(values?:number[]): IPie;
|
||||
}
|
||||
|
||||
declare var Donut: {
|
||||
prototype: IPie;
|
||||
new(values?:number[]): IPie;
|
||||
}
|
||||
|
||||
declare var Bubble: {
|
||||
prototype: IBubble;
|
||||
new(values?:number[]): IBubble;
|
||||
}
|
||||
|
||||
declare var Gantt: {
|
||||
prototype: IGantt;
|
||||
new(values?:number[]): IGantt;
|
||||
}
|
||||
|
||||
declare var Volume: {
|
||||
prototype: ICustomBar;
|
||||
new(values?:number[]): ICustomBar;
|
||||
}
|
||||
|
||||
declare var Candle: {
|
||||
prototype: ICandle;
|
||||
new(values?:number[]): ICandle;
|
||||
}
|
||||
|
||||
// TOOLS
|
||||
|
||||
declare var CursorTool: {
|
||||
prototype: ICursorTool;
|
||||
new(chart?: Chart): ICursorTool;
|
||||
}
|
||||
|
||||
declare var DragTool: {
|
||||
prototype: IDragTool;
|
||||
new(chart?: Chart): IDragTool;
|
||||
}
|
||||
|
||||
declare var ToolTip: {
|
||||
prototype: IToolTip;
|
||||
new(chart?: Chart): IToolTip;
|
||||
}
|
||||
}
|
||||
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
// Type definitions for Toastr 1.0
|
||||
// Project: https://github.com/CodeSeven/toastr
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="jquery-1.8.d.ts" />
|
||||
|
||||
interface ToastrOptions {
|
||||
tapToDismiss?: bool;
|
||||
toastClass?: string;
|
||||
containerId?: string;
|
||||
debug?: bool;
|
||||
fadeIn?: number;
|
||||
fadeOut?: number;
|
||||
extendedTimeOut?: number;
|
||||
iconClasses?: {
|
||||
error: string;
|
||||
info: string;
|
||||
success: string;
|
||||
warning: string;
|
||||
};
|
||||
iconClass?: string;
|
||||
positionClass?: string;
|
||||
timeOut?: number;
|
||||
titleClass?: string;
|
||||
messageClass?: string;
|
||||
|
||||
onclick?: () => void;
|
||||
}
|
||||
|
||||
interface ToastrDisplayMethod {
|
||||
(message: string): JQuery;
|
||||
(message: string, title: string): JQuery;
|
||||
(message: string, title: string, overrides: ToastrOptions): JQuery;
|
||||
}
|
||||
|
||||
interface Toastr {
|
||||
options: ToastrOptions;
|
||||
|
||||
clear(): void;
|
||||
info: ToastrDisplayMethod;
|
||||
warning: ToastrDisplayMethod;
|
||||
success: ToastrDisplayMethod;
|
||||
error: ToastrDisplayMethod;
|
||||
}
|
||||
|
||||
declare var toastr: Toastr;
|
||||
Vendored
+133
@@ -0,0 +1,133 @@
|
||||
// Type definitions for TweenJS 0.3
|
||||
// Project: http://www.createjs.com/#!/TweenJS
|
||||
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
module createjs {
|
||||
|
||||
export class CSSPlugin {
|
||||
// properties
|
||||
static cssSuffixMap: Object;
|
||||
|
||||
// methods
|
||||
static install(): void;
|
||||
}
|
||||
|
||||
|
||||
export class Ease {
|
||||
// methods
|
||||
static backIn(): number;
|
||||
static backInOut(): number;
|
||||
static backOut(): number;
|
||||
static bounceIn(amount: number): number;
|
||||
static bounceInOut(amount: number): number;
|
||||
static bounceOut(amount: number): number;
|
||||
static circIn(amount: number): number;
|
||||
static circInOut(amount: number): number;
|
||||
static circOut(amount: number): number;
|
||||
static cubicIn(): number;
|
||||
static cubicInOut(): number;
|
||||
static cubicOut(): number;
|
||||
static elasticIn(): number;
|
||||
static elasticInOut(): number;
|
||||
static elasticOut(): number;
|
||||
static get(amount: number): (amount: number) => number;
|
||||
static getBackIn(amount: number): (amount: number) => number;
|
||||
static getBackInOut(amount: number): (amount: number) => number;
|
||||
static getBackOut(amount: number): (amount: number) => number;
|
||||
static getElasticIn(amplitude: number, period: number): (amount: number) => number;
|
||||
static getElasticInOut(amplitude: number, period: number): (amount: number) => number;
|
||||
static getElasticOut(amplitude: number, period: number): (amount: number) => number;
|
||||
static getPowIn(pow: number): (amount: number) => number;
|
||||
static getPowInOut(pow: number): (amount: number) => number;
|
||||
static getPowOut(pow: number): (amount: number) => number;
|
||||
static linear(amount: number): number;
|
||||
static none(amount: number): number; // same as linear
|
||||
static quadIn(): (amount: number) => number;
|
||||
static quadInOut(): (amount: number) => number;
|
||||
static quadOut(): (amount: number) => number;
|
||||
static quartIn(): (amount: number) => number;
|
||||
static quartInOut(): (amount: number) => number;
|
||||
static quartOut(): (amount: number) => number;
|
||||
static quintIn(): (amount: number) => number;
|
||||
static quintInOut(): (amount: number) => number;
|
||||
static quintOut(): (amount: number) => number;
|
||||
static sineIn(amount: number): number;
|
||||
static sineInOut(amount: number): number;
|
||||
static sineOut(amount: number): number;
|
||||
}
|
||||
|
||||
|
||||
export class Timeline {
|
||||
constructor (tweens: Tween[], labels: Object, props: Object);
|
||||
|
||||
// properties
|
||||
duration: number;
|
||||
ignoreGlobalPause: bool;
|
||||
loop: bool;
|
||||
position: number;
|
||||
|
||||
// methods
|
||||
addLabel(label: string, position: number): void;
|
||||
addTween(...tween: Tween[]): void;
|
||||
gotoAndPlay(positionOrLabel: string): void;
|
||||
gotoAndPlay(positionOrLabel: number): void;
|
||||
gotoAndStop(positionOrLabel: string): void;
|
||||
gotoAndStop(positionOrLabel: number): void;
|
||||
removeTween(...tween: Tween[]): void;
|
||||
resolve(positionOrLabel: string): number;
|
||||
resolve(positionOrLabel: number): number;
|
||||
setPaused(value: bool): void;
|
||||
setPosition(value: number, actionsMode?: number): void;
|
||||
tick(delta: number): void;
|
||||
toString(): string;
|
||||
updateDuration(): void;
|
||||
|
||||
// events
|
||||
onChange: (instance: Timeline) => any;
|
||||
}
|
||||
|
||||
|
||||
export class Tween {
|
||||
constructor (target: Object, props: Object);
|
||||
|
||||
// properties
|
||||
duration: number;
|
||||
static IGNORE: Object;
|
||||
ignoreGlobalPause: bool;
|
||||
loop: bool;
|
||||
static LOOP: number;
|
||||
static NONE: number;
|
||||
pluginData: Object;
|
||||
position: number;
|
||||
static REVERSE: number;
|
||||
target: Object;
|
||||
|
||||
// methods
|
||||
call(callback: (tweenObject: Tween) => any, params?: any[], scope?: Object); // when 'params' isn't given, the callback receives a tweenObject
|
||||
call(callback: (...params: any[]) => any, params?: any[], scope?: Object); // otherwise, it receives the params only
|
||||
static get(target, props: Object): Tween;
|
||||
static hasActiveTweens(target? ): void;
|
||||
static installPlugin(plugin: Object, properties: Object): void;
|
||||
pause(tween: Tween): void;
|
||||
play(tween: Tween): void;
|
||||
static removeTweens(target): void;
|
||||
set(props: Object, target? ): void;
|
||||
setPaused(value: bool): void;
|
||||
setPosition(value: number, actionsMode: number): void;
|
||||
static tick(delta: number, paused: bool): void;
|
||||
to(props: Object, duration?: number, ease?: (amount: number) => number): Tween;
|
||||
toString(): string;
|
||||
wait(duration: number): void;
|
||||
|
||||
// events
|
||||
onChange: (instance: Tween) => any;
|
||||
}
|
||||
}
|
||||
Vendored
+4
-1
@@ -1,5 +1,8 @@
|
||||
// Type definitions for Underscore 1.4.1
|
||||
// https://github.com/borisyankov/DefinitelyTyped
|
||||
// Project: http://underscorejs.org/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface UnderscoreWrappedObject {
|
||||
value () : any;
|
||||
|
||||
+3097
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user