Use string literals for '[Symbol.toStringTag]' properties.
This commit is contained in:
parent
a4dc0f37da
commit
7d292c41d6
22
src/lib/es6.d.ts
vendored
22
src/lib/es6.d.ts
vendored
|
@ -7,7 +7,7 @@ interface Symbol {
|
|||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Object;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Symbol";
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
|
@ -565,7 +565,7 @@ interface IterableIterator<T> extends Iterator<T> {
|
|||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
|
@ -690,7 +690,7 @@ interface Math {
|
|||
*/
|
||||
cbrt(x: number): number;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Math";
|
||||
}
|
||||
|
||||
interface Date {
|
||||
|
@ -807,7 +807,7 @@ interface Map<K, V> {
|
|||
size: number;
|
||||
values(): IterableIterator<V>;
|
||||
[Symbol.iterator]():IterableIterator<[K,V]>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Map";
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
|
@ -824,7 +824,7 @@ interface WeakMap<K, V> {
|
|||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakMap";
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
|
@ -846,7 +846,7 @@ interface Set<T> {
|
|||
size: number;
|
||||
values(): IterableIterator<T>;
|
||||
[Symbol.iterator]():IterableIterator<T>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
|
@ -862,7 +862,7 @@ interface WeakSet<T> {
|
|||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
|
@ -874,7 +874,7 @@ interface WeakSetConstructor {
|
|||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
interface JSON {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "JSON";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -884,11 +884,11 @@ interface JSON {
|
|||
* buffer as needed.
|
||||
*/
|
||||
interface ArrayBuffer {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "ArrayBuffer";
|
||||
}
|
||||
|
||||
interface DataView {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "DataView";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1258,7 +1258,7 @@ interface Promise<T> {
|
|||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Promise";
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
|
|
Loading…
Reference in a new issue