Skip to content

Commit 02e487a

Browse files
authored
Merge pull request #14811 from IgorNovozhilov/patch-1
[object Generator]
2 parents 9e8b3d9 + ee2a909 commit 02e487a

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

src/lib/es2015.generator.d.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,52 @@
1-
interface GeneratorFunction extends Function { }
1+
interface Generator extends Iterator<any> { }
2+
3+
interface GeneratorFunction {
4+
/**
5+
* Creates a new Generator object.
6+
* @param args A list of arguments the function accepts.
7+
*/
8+
new (...args: any[]): Generator;
9+
/**
10+
* Creates a new Generator object.
11+
* @param args A list of arguments the function accepts.
12+
*/
13+
(...args: any[]): Generator;
14+
/**
15+
* The length of the arguments.
16+
*/
17+
readonly length: number;
18+
/**
19+
* Returns the name of the function.
20+
*/
21+
readonly name: string;
22+
/**
23+
* A reference to the prototype.
24+
*/
25+
readonly prototype: Generator;
26+
}
227

328
interface GeneratorFunctionConstructor {
429
/**
530
* Creates a new Generator function.
631
* @param args A list of arguments the function accepts.
732
*/
833
new (...args: string[]): GeneratorFunction;
34+
/**
35+
* Creates a new Generator function.
36+
* @param args A list of arguments the function accepts.
37+
*/
938
(...args: string[]): GeneratorFunction;
39+
/**
40+
* The length of the arguments.
41+
*/
42+
readonly length: number;
43+
/**
44+
* Returns the name of the function.
45+
*/
46+
readonly name: string;
47+
/**
48+
* A reference to the prototype.
49+
*/
1050
readonly prototype: GeneratorFunction;
1151
}
1252
declare var GeneratorFunction: GeneratorFunctionConstructor;

src/lib/es2015.symbol.wellknown.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ interface Function {
137137
[Symbol.hasInstance](value: any): boolean;
138138
}
139139

140-
interface GeneratorFunction extends Function {
140+
interface GeneratorFunction {
141141
readonly [Symbol.toStringTag]: "GeneratorFunction";
142142
}
143143

0 commit comments

Comments
 (0)