forked from nodirt/AngularTS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular.d.ts
73 lines (65 loc) · 2.75 KB
/
angular.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/// <reference path="jquery.d.ts" />
/// <reference path="angular.ng.d.ts" />
declare module angular {
function boostrap(element: HTMLElement, modules?: any[]): AUTO.$injector;
function element(html: string): JQuery;
function element(html: HTMLElement): JQuery;
function injector(modules: any[]): AUTO.$injector;
function module(name?: string, requires?: string[], configFn?: Function): ng.Module;
function module(name: string, configFn: Function): ng.Module;
// type check functions
function isArray(value): bool;
function isDate(value): bool;
function isDefined(value): bool;
function isElement(value): bool;
function isFunction(value): bool;
function isObject(value): bool;
function isString(value): bool;
function isUndefined(value): bool;
// util funtions
function bind(self: Object, fn: (self: Object, ...args: any[]) => any, ...args: any[]): Function;
function copy(source, destination: Object);
function copy(source, destination: Array);
function copy(source);
function forEach(obj: Object, iterator: (value, key) => any, context?: Object): Object;
function forEach(Array: any[], iterator: (element, i: number) => any, context?: Object): any[];
function noop(...args: any[]): void;
function identity(x);
function equals(o1, o2): bool;
function extend(dst: Object, ...src: Object[]): void;
function fromJson(json: string);
function toJson(obj, pretty?: bool): string;
function upperCase(text: string): string;
function lowerCase(text: string): string;
// fields
var version: {
full: string;
major: number;
minor: number;
dot: number;
codeName: string;
}
export module AUTO {
interface FunctionWith$inject extends Function {
$inject?: string[];
}
interface $injector {
$annotate(fn: FunctionWith$inject): string[];
$annotate(fn: any[]): string[];
get(name: string): Object;
instantiate(Type: Function, locals?: Object): Object;
invoke(fn: Function, self?: Object, locals?: Object);
}
interface ProvideBase {
constant(name: string, object);
factory(name: string, $getFn: Function): Object;
provider(name: string, provider: { $get: Function; }): Object;
provider(name: string, provider: Function): Object;
service(name: string, constructor: Function): Object;
value(name: string, value): Object;
}
interface $provide extends ProvideBase {
decorator(name: string, decorator: ($delegate: Object, ...args: any[]) => any): Object;
}
}
}