Use string literals for '[Symbol.toStringTag]' properties.

This commit is contained in:
Daniel Rosenwasser 2016-01-05 11:23:45 -05:00
parent a4dc0f37da
commit 7d292c41d6

22
src/lib/es6.d.ts vendored
View file

@ -7,7 +7,7 @@ interface Symbol {
/** Returns the primitive value of the specified object. */ /** Returns the primitive value of the specified object. */
valueOf(): Object; valueOf(): Object;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "Symbol";
} }
interface SymbolConstructor { interface SymbolConstructor {
@ -565,7 +565,7 @@ interface IterableIterator<T> extends Iterator<T> {
} }
interface GeneratorFunction extends Function { interface GeneratorFunction extends Function {
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "GeneratorFunction";
} }
interface GeneratorFunctionConstructor { interface GeneratorFunctionConstructor {
@ -690,7 +690,7 @@ interface Math {
*/ */
cbrt(x: number): number; cbrt(x: number): number;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "Math";
} }
interface Date { interface Date {
@ -807,7 +807,7 @@ interface Map<K, V> {
size: number; size: number;
values(): IterableIterator<V>; values(): IterableIterator<V>;
[Symbol.iterator]():IterableIterator<[K,V]>; [Symbol.iterator]():IterableIterator<[K,V]>;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "Map";
} }
interface MapConstructor { interface MapConstructor {
@ -824,7 +824,7 @@ interface WeakMap<K, V> {
get(key: K): V; get(key: K): V;
has(key: K): boolean; has(key: K): boolean;
set(key: K, value?: V): WeakMap<K, V>; set(key: K, value?: V): WeakMap<K, V>;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "WeakMap";
} }
interface WeakMapConstructor { interface WeakMapConstructor {
@ -846,7 +846,7 @@ interface Set<T> {
size: number; size: number;
values(): IterableIterator<T>; values(): IterableIterator<T>;
[Symbol.iterator]():IterableIterator<T>; [Symbol.iterator]():IterableIterator<T>;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "Set";
} }
interface SetConstructor { interface SetConstructor {
@ -862,7 +862,7 @@ interface WeakSet<T> {
clear(): void; clear(): void;
delete(value: T): boolean; delete(value: T): boolean;
has(value: T): boolean; has(value: T): boolean;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "WeakSet";
} }
interface WeakSetConstructor { interface WeakSetConstructor {
@ -874,7 +874,7 @@ interface WeakSetConstructor {
declare var WeakSet: WeakSetConstructor; declare var WeakSet: WeakSetConstructor;
interface JSON { interface JSON {
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "JSON";
} }
/** /**
@ -884,11 +884,11 @@ interface JSON {
* buffer as needed. * buffer as needed.
*/ */
interface ArrayBuffer { interface ArrayBuffer {
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "ArrayBuffer";
} }
interface DataView { 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) => T | PromiseLike<T>): Promise<T>;
catch(onrejected?: (reason: any) => void): Promise<T>; catch(onrejected?: (reason: any) => void): Promise<T>;
[Symbol.toStringTag]: string; [Symbol.toStringTag]: "Promise";
} }
interface PromiseConstructor { interface PromiseConstructor {