@@ -166,14 +166,14 @@ interface ObjectConstructor {
166
166
* Creates an object that has the specified prototype, and that optionally contains specified properties.
167
167
* @param o Object to use as a prototype. May be null
168
168
*/
169
- create<T>(o: T): T;
169
+ create<T extends object >(o: T): T;
170
170
171
171
/**
172
172
* Creates an object that has the specified prototype, and that optionally contains specified properties.
173
173
* @param o Object to use as a prototype. May be null
174
174
* @param properties JavaScript object that contains one or more property descriptors.
175
175
*/
176
- create(o: any , properties: PropertyDescriptorMap): any;
176
+ create(o: object | null , properties: PropertyDescriptorMap): any;
177
177
178
178
/**
179
179
* Adds a property to an object, or modifies attributes of an existing property.
@@ -4523,7 +4523,7 @@ interface ObjectConstructor {
4523
4523
* @param o The object to change its prototype.
4524
4524
* @param proto The value of the new prototype or null.
4525
4525
*/
4526
- setPrototypeOf(o: any, proto: any ): any;
4526
+ setPrototypeOf(o: any, proto: object | null ): any;
4527
4527
4528
4528
/**
4529
4529
* Gets the own property descriptor of the specified object.
@@ -4728,7 +4728,7 @@ interface Map<K, V> {
4728
4728
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
4729
4729
get(key: K): V | undefined;
4730
4730
has(key: K): boolean;
4731
- set(key: K, value? : V): this;
4731
+ set(key: K, value: V): this;
4732
4732
readonly size: number;
4733
4733
}
4734
4734
@@ -4746,16 +4746,16 @@ interface ReadonlyMap<K, V> {
4746
4746
readonly size: number;
4747
4747
}
4748
4748
4749
- interface WeakMap<K, V> {
4749
+ interface WeakMap<K extends object , V> {
4750
4750
delete(key: K): boolean;
4751
4751
get(key: K): V | undefined;
4752
4752
has(key: K): boolean;
4753
- set(key: K, value? : V): this;
4753
+ set(key: K, value: V): this;
4754
4754
}
4755
4755
4756
4756
interface WeakMapConstructor {
4757
4757
new (): WeakMap<any, any>;
4758
- new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
4758
+ new <K extends object , V>(entries?: [K, V][]): WeakMap<K, V>;
4759
4759
readonly prototype: WeakMap<any, any>;
4760
4760
}
4761
4761
declare var WeakMap: WeakMapConstructor;
@@ -4911,10 +4911,10 @@ interface MapConstructor {
4911
4911
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
4912
4912
}
4913
4913
4914
- interface WeakMap<K, V> { }
4914
+ interface WeakMap<K extends object , V> { }
4915
4915
4916
4916
interface WeakMapConstructor {
4917
- new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
4917
+ new <K extends object , V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
4918
4918
}
4919
4919
4920
4920
interface Set<T> {
@@ -5256,6 +5256,7 @@ interface Float64ArrayConstructor {
5256
5256
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
5257
5257
}
5258
5258
5259
+
5259
5260
/**
5260
5261
* Represents the completion of an asynchronous operation
5261
5262
*/
@@ -5512,7 +5513,7 @@ interface PromiseConstructor {
5512
5513
declare var Promise: PromiseConstructor;
5513
5514
5514
5515
interface ProxyHandler<T> {
5515
- getPrototypeOf? (target: T): {} | null;
5516
+ getPrototypeOf? (target: T): object | null;
5516
5517
setPrototypeOf? (target: T, v: any): boolean;
5517
5518
isExtensible? (target: T): boolean;
5518
5519
preventExtensions? (target: T): boolean;
@@ -5525,7 +5526,7 @@ interface ProxyHandler<T> {
5525
5526
enumerate? (target: T): PropertyKey[];
5526
5527
ownKeys? (target: T): PropertyKey[];
5527
5528
apply? (target: T, thisArg: any, argArray?: any): any;
5528
- construct? (target: T, argArray: any, newTarget?: any): {};
5529
+ construct? (target: T, argArray: any, newTarget?: any): object
5529
5530
}
5530
5531
5531
5532
interface ProxyConstructor {
@@ -5556,7 +5557,7 @@ interface Symbol {
5556
5557
toString(): string;
5557
5558
5558
5559
/** Returns the primitive value of the specified object. */
5559
- valueOf(): Object ;
5560
+ valueOf(): symbol ;
5560
5561
}
5561
5562
5562
5563
interface SymbolConstructor {
@@ -5700,7 +5701,7 @@ interface Map<K, V> {
5700
5701
readonly [Symbol.toStringTag]: "Map";
5701
5702
}
5702
5703
5703
- interface WeakMap<K, V>{
5704
+ interface WeakMap<K extends object , V>{
5704
5705
readonly [Symbol.toStringTag]: "WeakMap";
5705
5706
}
5706
5707
@@ -5917,6 +5918,7 @@ interface Float64Array {
5917
5918
}
5918
5919
5919
5920
5921
+
5920
5922
/////////////////////////////
5921
5923
/// IE DOM APIs
5922
5924
/////////////////////////////
0 commit comments