Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / prettier-eslint / node_modules / typescript / lib / lib.es2015.generator.d.ts
1 /*! *****************************************************************************
2 Copyright (c) Microsoft Corporation. All rights reserved.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the
5 License at http://www.apache.org/licenses/LICENSE-2.0
6
7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 MERCHANTABLITY OR NON-INFRINGEMENT.
11
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
15
16
17
18 /// <reference no-default-lib="true"/>\r
19
20
21 /// <reference lib="es2015.iterable" />\r
22 \r
23 interface Generator<T = unknown, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> {\r
24     // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.\r
25     next(...args: [] | [TNext]): IteratorResult<T, TReturn>;\r
26     return(value: TReturn): IteratorResult<T, TReturn>;\r
27     throw(e: any): IteratorResult<T, TReturn>;\r
28     [Symbol.iterator](): Generator<T, TReturn, TNext>;\r
29 }\r
30 \r
31 interface GeneratorFunction {\r
32     /**\r
33      * Creates a new Generator object.\r
34      * @param args A list of arguments the function accepts.\r
35      */\r
36     new (...args: any[]): Generator;\r
37     /**\r
38      * Creates a new Generator object.\r
39      * @param args A list of arguments the function accepts.\r
40      */\r
41     (...args: any[]): Generator;\r
42     /**\r
43      * The length of the arguments.\r
44      */\r
45     readonly length: number;\r
46     /**\r
47      * Returns the name of the function.\r
48      */\r
49     readonly name: string;\r
50     /**\r
51      * A reference to the prototype.\r
52      */\r
53     readonly prototype: Generator;\r
54 }\r
55 \r
56 interface GeneratorFunctionConstructor {\r
57     /**\r
58      * Creates a new Generator function.\r
59      * @param args A list of arguments the function accepts.\r
60      */\r
61     new (...args: string[]): GeneratorFunction;\r
62     /**\r
63      * Creates a new Generator function.\r
64      * @param args A list of arguments the function accepts.\r
65      */\r
66     (...args: string[]): GeneratorFunction;\r
67     /**\r
68      * The length of the arguments.\r
69      */\r
70     readonly length: number;\r
71     /**\r
72      * Returns the name of the function.\r
73      */\r
74     readonly name: string;\r
75     /**\r
76      * A reference to the prototype.\r
77      */\r
78     readonly prototype: GeneratorFunction;\r
79 }\r