[object Generator]
25.3 Generator Objects http://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects ``` C:\Users> node > GF = function* (){} [Function: GF] > GF.constructor.name 'GeneratorFunction' > G = GF() {} > G + '' '[object Generator]' ```
This commit is contained in:
parent
aad80ad138
commit
a065331d69
11
src/lib/es2015.generator.d.ts
vendored
11
src/lib/es2015.generator.d.ts
vendored
|
@ -1,4 +1,13 @@
|
|||
interface GeneratorFunction extends Function { }
|
||||
interface Generator extends Iterator<any> { }
|
||||
|
||||
interface GeneratorFunction {
|
||||
/**
|
||||
* Creates a new Generator object.
|
||||
* @param args A list of arguments the function accepts.
|
||||
*/
|
||||
new (...args: any[]): Generator;
|
||||
(...args: any[]): Generator;
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
/**
|
||||
|
|
2
src/lib/es2015.symbol.wellknown.d.ts
vendored
2
src/lib/es2015.symbol.wellknown.d.ts
vendored
|
@ -137,7 +137,7 @@ interface Function {
|
|||
[Symbol.hasInstance](value: any): boolean;
|
||||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
interface GeneratorFunction {
|
||||
readonly [Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue