forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathes-collections.d.ts
61 lines (53 loc) · 1.48 KB
/
es-collections.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
/* tslint:disable */
/////////////////////////////
/// IE11 ECMAScript Extensions
/////////////////////////////
interface List<T> extends Array<T> {}
interface Map<K, V> {
clear(): void;
delete(key: K): boolean;
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V;
has(key: K): boolean;
set(key: K, value: V): Map<K, V>;
size: number;
keys(): Array<K>;
values(): Array<V>;
}
declare var Map: {
new <K, V>(): Map<K, V>;
// needed by Angular
// alexeagle: PATCHED
new<K, V>(m: Map<K, V>): Map<K, V>;
new<K, V>(l: List<any>): Map<K, V>;
prototype: Map<any, any>;
}
//For compatibility - some libs insist on the Map/Set types being named that way
declare type MapConstructor = typeof Map;
declare type SetConstructor = typeof Set;
interface Set<T> {
add(value: T): Set<T>;
clear(): void;
delete(value: T): boolean;
forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
has(value: T): boolean;
size: number;
}
declare var Set: {
new <T>(): Set<T>;
// needed by Angular
// alexeagle PATCHED
new<T>(s: Set<T>): Set<T>;
new<T>(l: List<T>): Set<T>;
prototype: Set<any>;
}
//Compatibility interfaces for rxjs
interface IteratorResult<T> {
done: boolean;
value?: T;
}
interface Iterator<T> {
next(value?: any): IteratorResult<T>;
return?(value?: any): IteratorResult<T>;
throw?(e?: any): IteratorResult<T>;
}