We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 533cc96 commit 188fb76Copy full SHA for 188fb76
lib/lib.d.ts
lib/lib.dom.d.ts
lib/lib.es2015.collection.d.ts
@@ -24,7 +24,7 @@ interface Map<K, V> {
24
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
25
get(key: K): V | undefined;
26
has(key: K): boolean;
27
- set(key: K, value?: V): this;
+ set(key: K, value: V): this;
28
readonly size: number;
29
}
30
@@ -42,16 +42,16 @@ interface ReadonlyMap<K, V> {
42
43
44
45
-interface WeakMap<K, V> {
+interface WeakMap<K extends object, V> {
46
delete(key: K): boolean;
47
48
49
50
51
52
interface WeakMapConstructor {
53
new (): WeakMap<any, any>;
54
- new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
+ new <K extends object, V>(entries?: [K, V][]): WeakMap<K, V>;
55
readonly prototype: WeakMap<any, any>;
56
57
declare var WeakMap: WeakMapConstructor;
lib/lib.es2015.core.d.ts
@@ -345,7 +345,7 @@ interface ObjectConstructor {
345
* @param o The object to change its prototype.
346
* @param proto The value of the new prototype or null.
347
*/
348
- setPrototypeOf(o: any, proto: any): any;
+ setPrototypeOf(o: any, proto: object | null): any;
349
350
/**
351
* Gets the own property descriptor of the specified object.
lib/lib.es2015.iterable.d.ts
@@ -119,10 +119,10 @@ interface MapConstructor {
119
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
120
121
122
-interface WeakMap<K, V> { }
+interface WeakMap<K extends object, V> { }
123
124
125
- new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
+ new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
126
127
128
interface Set<T> {
@@ -462,4 +462,4 @@ interface Float64ArrayConstructor {
462
* @param thisArg Value of 'this' used to invoke the mapfn.
463
464
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
465
-}
+}
lib/lib.es2015.proxy.d.ts
@@ -19,7 +19,7 @@ and limitations under the License.
19
20
21
interface ProxyHandler<T> {
22
- getPrototypeOf? (target: T): {} | null;
+ getPrototypeOf? (target: T): object | null;
23
setPrototypeOf? (target: T, v: any): boolean;
isExtensible? (target: T): boolean;
preventExtensions? (target: T): boolean;
@@ -32,7 +32,7 @@ interface ProxyHandler<T> {
32
enumerate? (target: T): PropertyKey[];
33
ownKeys? (target: T): PropertyKey[];
34
apply? (target: T, thisArg: any, argArray?: any): any;
35
- construct? (target: T, argArray: any, newTarget?: any): {};
+ construct? (target: T, argArray: any, newTarget?: any): object
36
37
38
interface ProxyConstructor {
lib/lib.es2015.symbol.d.ts
@@ -23,7 +23,7 @@ interface Symbol {
toString(): string;
/** Returns the primitive value of the specified object. */
- valueOf(): Object;
+ valueOf(): symbol;
interface SymbolConstructor {
lib/lib.es2015.symbol.wellknown.d.ts
@@ -130,7 +130,7 @@ interface Map<K, V> {
130
readonly [Symbol.toStringTag]: "Map";
131
132
133
-interface WeakMap<K, V>{
+interface WeakMap<K extends object, V>{
134
readonly [Symbol.toStringTag]: "WeakMap";
135
136
@@ -344,4 +344,4 @@ interface Float32Array {
344
interface Float64Array {
readonly [Symbol.toStringTag]: "Float64Array";
lib/lib.es5.d.ts
@@ -166,14 +166,14 @@ interface ObjectConstructor {
166
* Creates an object that has the specified prototype, and that optionally contains specified properties.
167
* @param o Object to use as a prototype. May be null
168
169
- create<T>(o: T): T;
+ create<T extends object>(o: T): T;
170
171
172
173
174
* @param properties JavaScript object that contains one or more property descriptors.
175
176
- create(o: any, properties: PropertyDescriptorMap): any;
+ create(o: object | null, properties: PropertyDescriptorMap): any;
177
178
179
* Adds a property to an object, or modifies attributes of an existing property.
0 commit comments