8000 Clean up library files · icssjs/TypeScript@15367e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 15367e7

Browse files
author
Kanchalai Tanglertsampan
committed
Clean up library files
1 parent 7e1470d commit 15367e7

File tree

3 files changed

+38
-47
lines changed

3 files changed

+38
-47
lines changed

src/lib/es2015.array.d.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,4 @@
1-
21
interface Array<T> {
3-
/** Iterator */
4-
[Symbol.iterator](): IterableIterator<T>;
5-
6-
/**
7-
* Returns an object whose properties have the value 'true'
8-
* when they will be absent when used in a 'with' statement.
9-
*/
10-
[Symbol.unscopables](): {
11-
copyWithin: boolean;
12-
entries: boolean;
13-
fill: boolean;
14-
find: boolean;
15-
findIndex: boolean;
16-
keys: boolean;
17-
values: boolean;
18-
};
19-
20-
/**
21-
* Returns an array of key, value pairs for every entry in the array
22-
*/
23-
entries(): IterableIterator<[number, T]>;
24-
25-
/**
26-
* Returns an list of keys in the array
27-
*/
28-
keys(): IterableIterator<number>;
29-
30-
/**
31-
* Returns an list of values in the array
32-
*/
33-
values(): IterableIterator<T>;
34-
352
/**
363
* Returns the value of the first element in the array where predicate is true, and undefined
374
* otherwise.
@@ -85,26 +52,13 @@ interface ArrayConstructor {
8552
*/
8653
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
8754

88-
/**
89-
* Creates an array from an iterable object.
90-
* @param iterable An iterable object to convert to an array.
91-
* @param mapfn A mapping function to call on every element of the array.
92-
* @param thisArg Value of 'this' used to invoke the mapfn.
93-
*/
94-
from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
9555

9656
/**
9757
* Creates an array from an array-like object.
9858
* @param arrayLike An array-like object to convert to an array.
9959
*/
10060
from<T>(arrayLike: ArrayLike<T>): Array<T>;
10161

102-
/**
103-
* Creates an array from an iterable object.
104-
* @param iterable An iterable object to convert to an array.
105-
*/
106-
from<T>(iterable: Iterable<T>): Array<T>;
107-
10862
/**
10963
* Returns a new array from a set of elements.
11064
* @param items A set of elements to include in the new array object.

src/lib/es2015.collection.d.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,40 @@ interface WeakMapConstructor {
3131
}
3232
declare var WeakMap: WeakMapConstructor;
3333

34+
interface Set<T> {
35+
add(value: T): Set<T>;
36+
clear(): void;
37+
delete(value: T): boolean;
38+
entries(): IterableIterator<[T, T]>;
39+
forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
40+
has(value: T): boolean;
41+
keys(): IterableIterator<T>;
42+
readonly size: number;
43+
values(): IterableIterator<T>;
44+
[Symbol.iterator]():IterableIterator<T>;
45+
readonly [Symbol.toStringTag]: "Set";
46+
}
47+
48+
interface SetConstructor {
49+
new (): Set<any>;
50+
new <T>(): Set<T>;
51+
new <T>(iterable: Iterable<T>): Set<T>;
52+
readonly prototype: Set<any>;
53+
}
54+
declare var Set: SetConstructor;
55+
56+
interface WeakSet<T> {
57+
add(value: T): WeakSet<T>;
58+
clear(): void;
59+
delete(value: T): boolean;
60+
has(value: T): boolean;
61+
readonly [Symbol.toStringTag]: "WeakSet";
62+
}
63+
64+
interface WeakSetConstructor {
57AE 65+
new (): WeakSet<any>;
66+
new <T>(): WeakSet<T>;
67+
new <T>(iterable: Iterable<T>): WeakSet<T>;
68+
readonly prototype: WeakSet<any>;
69+
}
70+
declare var WeakSet: WeakSetConstructor;

src/lib/es5.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4106,4 +4106,4 @@ interface Date {
41064106
* @param options An object that contains one or more properties that specify comparison options.
41074107
*/
41084108
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
4109-
}
4109+
}

0 commit comments

Comments
 (0)
0