Skip to content

Commit 188fb76

Browse files
committed
Finalize merge
1 parent 533cc96 commit 188fb76

21 files changed

+113305
-103715
lines changed

lib/lib.d.ts

Lines changed: 1565 additions & 366 deletions
Large diffs are not rendered by default.

lib/lib.dom.d.ts

Lines changed: 1563 additions & 364 deletions
Large diffs are not rendered by default.

lib/lib.es2015.collection.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Map<K, V> {
2424
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
2525
get(key: K): V | undefined;
2626
has(key: K): boolean;
27-
set(key: K, value?: V): this;
27+
set(key: K, value: V): this;
2828
readonly size: number;
2929
}
3030

@@ -42,16 +42,16 @@ interface ReadonlyMap<K, V> {
4242
readonly size: number;
4343
}
4444

45-
interface WeakMap<K, V> {
45+
interface WeakMap<K extends object, V> {
4646
delete(key: K): boolean;
4747
get(key: K): V | undefined;
4848
has(key: K): boolean;
49-
set(key: K, value?: V): this;
49+
set(key: K, value: V): this;
5050
}
5151

5252
interface WeakMapConstructor {
5353
new (): WeakMap<any, any>;
54-
new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
54+
new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
5555
readonly prototype: WeakMap<any, any>;
5656
}
5757
declare var WeakMap: WeakMapConstructor;

lib/lib.es2015.core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ interface ObjectConstructor {
345345
* @param o The object to change its prototype.
346346
* @param proto The value of the new prototype or null.
347347
*/
348-
setPrototypeOf(o: any, proto: any): any;
348+
setPrototypeOf(o: any, proto: object | null): any;
349349

350350
/**
351351
* Gets the own property descriptor of the specified object.

lib/lib.es2015.iterable.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ interface MapConstructor {
119119
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
120120
}
121121

122-
interface WeakMap<K, V> { }
122+
interface WeakMap<K extends object, V> { }
123123

124124
interface WeakMapConstructor {
125-
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
125+
new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
126126
}
127127

128128
interface Set<T> {
@@ -462,4 +462,4 @@ interface Float64ArrayConstructor {
462462
* @param thisArg Value of 'this' used to invoke the mapfn.
463463
*/
464464
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
465-
}
465+
}

lib/lib.es2015.proxy.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ and limitations under the License.
1919

2020

2121
interface ProxyHandler<T> {
22-
getPrototypeOf? (target: T): {} | null;
22+
getPrototypeOf? (target: T): object | null;
2323
setPrototypeOf? (target: T, v: any): boolean;
2424
isExtensible? (target: T): boolean;
2525
preventExtensions? (target: T): boolean;
@@ -32,7 +32,7 @@ interface ProxyHandler<T> {
3232
enumerate? (target: T): PropertyKey[];
3333
ownKeys? (target: T): PropertyKey[];
3434
apply? (target: T, thisArg: any, argArray?: any): any;
35-
construct? (target: T, argArray: any, newTarget?: any): {};
35+
construct? (target: T, argArray: any, newTarget?: any): object
3636
}
3737

3838
interface ProxyConstructor {

lib/lib.es2015.symbol.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface Symbol {
2323
toString(): string;
2424

2525
/** Returns the primitive value of the specified object. */
26-
valueOf(): Object;
26+
valueOf(): symbol;
2727
}
2828

2929
interface SymbolConstructor {

lib/lib.es2015.symbol.wellknown.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ interface Map<K, V> {
130130
readonly [Symbol.toStringTag]: "Map";
131131
}
132132

133-
interface WeakMap<K, V>{
133+
interface WeakMap<K extends object, V>{
134134
readonly [Symbol.toStringTag]: "WeakMap";
135135
}
136136

@@ -344,4 +344,4 @@ interface Float32Array {
344344
*/
345345
interface Float64Array {
346346
readonly [Symbol.toStringTag]: "Float64Array";
347-
}
347+
}

lib/lib.es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ interface ObjectConstructor {
166166
* Creates an object that has the specified prototype, and that optionally contains specified properties.
167167
* @param o Object to use as a prototype. May be null
168168
*/
169-
create<T>(o: T): T;
169+
create<T extends object>(o: T): T;
170170

171171
/**
172172
* Creates an object that has the specified prototype, and that optionally contains specified properties.
173173
* @param o Object to use as a prototype. May be null
174174
* @param properties JavaScript object that contains one or more property descriptors.
175175
*/
176-
create(o: any, properties: PropertyDescriptorMap): any;
176+
create(o: object | null, properties: PropertyDescriptorMap): any;
177177

178178
/**
179179
* Adds a property to an object, or modifies attributes of an existing property.

0 commit comments

Comments
 (0)