Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / prettier-eslint / node_modules / typescript / lib / lib.es2015.symbol.wellknown.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.symbol" />\r
22 \r
23 interface SymbolConstructor {\r
24     /**\r
25      * A method that determines if a constructor object recognizes an object as one of the\r
26      * constructor’s instances. Called by the semantics of the instanceof operator.\r
27      */\r
28     readonly hasInstance: symbol;\r
29 \r
30     /**\r
31      * A Boolean value that if true indicates that an object should flatten to its array elements\r
32      * by Array.prototype.concat.\r
33      */\r
34     readonly isConcatSpreadable: symbol;\r
35 \r
36     /**\r
37      * A regular expression method that matches the regular expression against a string. Called\r
38      * by the String.prototype.match method.\r
39      */\r
40     readonly match: symbol;\r
41 \r
42     /**\r
43      * A regular expression method that replaces matched substrings of a string. Called by the\r
44      * String.prototype.replace method.\r
45      */\r
46     readonly replace: symbol;\r
47 \r
48     /**\r
49      * A regular expression method that returns the index within a string that matches the\r
50      * regular expression. Called by the String.prototype.search method.\r
51      */\r
52     readonly search: symbol;\r
53 \r
54     /**\r
55      * A function valued property that is the constructor function that is used to create\r
56      * derived objects.\r
57      */\r
58     readonly species: symbol;\r
59 \r
60     /**\r
61      * A regular expression method that splits a string at the indices that match the regular\r
62      * expression. Called by the String.prototype.split method.\r
63      */\r
64     readonly split: symbol;\r
65 \r
66     /**\r
67      * A method that converts an object to a corresponding primitive value.\r
68      * Called by the ToPrimitive abstract operation.\r
69      */\r
70     readonly toPrimitive: symbol;\r
71 \r
72     /**\r
73      * A String value that is used in the creation of the default string description of an object.\r
74      * Called by the built-in method Object.prototype.toString.\r
75      */\r
76     readonly toStringTag: symbol;\r
77 \r
78     /**\r
79      * An Object whose own property names are property names that are excluded from the 'with'\r
80      * environment bindings of the associated objects.\r
81      */\r
82     readonly unscopables: symbol;\r
83 }\r
84 \r
85 interface Symbol {\r
86     readonly [Symbol.toStringTag]: string;\r
87 }\r
88 \r
89 interface Array<T> {\r
90     /**\r
91      * Returns an object whose properties have the value 'true'\r
92      * when they will be absent when used in a 'with' statement.\r
93      */\r
94     [Symbol.unscopables](): {\r
95         copyWithin: boolean;\r
96         entries: boolean;\r
97         fill: boolean;\r
98         find: boolean;\r
99         findIndex: boolean;\r
100         keys: boolean;\r
101         values: boolean;\r
102     };\r
103 }\r
104 \r
105 interface Date {\r
106     /**\r
107      * Converts a Date object to a string.\r
108      */\r
109     [Symbol.toPrimitive](hint: "default"): string;\r
110     /**\r
111      * Converts a Date object to a string.\r
112      */\r
113     [Symbol.toPrimitive](hint: "string"): string;\r
114     /**\r
115      * Converts a Date object to a number.\r
116      */\r
117     [Symbol.toPrimitive](hint: "number"): number;\r
118     /**\r
119      * Converts a Date object to a string or number.\r
120      *\r
121      * @param hint The strings "number", "string", or "default" to specify what primitive to return.\r
122      *\r
123      * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".\r
124      * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".\r
125      */\r
126     [Symbol.toPrimitive](hint: string): string | number;\r
127 }\r
128 \r
129 interface Map<K, V> {\r
130     readonly [Symbol.toStringTag]: string;\r
131 }\r
132 \r
133 interface WeakMap<K extends object, V> {\r
134     readonly [Symbol.toStringTag]: string;\r
135 }\r
136 \r
137 interface Set<T> {\r
138     readonly [Symbol.toStringTag]: string;\r
139 }\r
140 \r
141 interface WeakSet<T extends object> {\r
142     readonly [Symbol.toStringTag]: string;\r
143 }\r
144 \r
145 interface JSON {\r
146     readonly [Symbol.toStringTag]: string;\r
147 }\r
148 \r
149 interface Function {\r
150     /**\r
151      * Determines whether the given value inherits from this function if this function was used\r
152      * as a constructor function.\r
153      *\r
154      * A constructor function can control which objects are recognized as its instances by\r
155      * 'instanceof' by overriding this method.\r
156      */\r
157     [Symbol.hasInstance](value: any): boolean;\r
158 }\r
159 \r
160 interface GeneratorFunction {\r
161     readonly [Symbol.toStringTag]: string;\r
162 }\r
163 \r
164 interface Math {\r
165     readonly [Symbol.toStringTag]: string;\r
166 }\r
167 \r
168 interface Promise<T> {\r
169     readonly [Symbol.toStringTag]: string;\r
170 }\r
171 \r
172 interface PromiseConstructor {\r
173     readonly [Symbol.species]: PromiseConstructor;\r
174 }\r
175 \r
176 interface RegExp {\r
177     /**\r
178      * Matches a string with this regular expression, and returns an array containing the results of\r
179      * that search.\r
180      * @param string A string to search within.\r
181      */\r
182     [Symbol.match](string: string): RegExpMatchArray | null;\r
183 \r
184     /**\r
185      * Replaces text in a string, using this regular expression.\r
186      * @param string A String object or string literal whose contents matching against\r
187      *               this regular expression will be replaced\r
188      * @param replaceValue A String object or string literal containing the text to replace for every\r
189      *                     successful match of this regular expression.\r
190      */\r
191     [Symbol.replace](string: string, replaceValue: string): string;\r
192 \r
193     /**\r
194      * Replaces text in a string, using this regular expression.\r
195      * @param string A String object or string literal whose contents matching against\r
196      *               this regular expression will be replaced\r
197      * @param replacer A function that returns the replacement text.\r
198      */\r
199     [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;\r
200 \r
201     /**\r
202      * Finds the position beginning first substring match in a regular expression search\r
203      * using this regular expression.\r
204      *\r
205      * @param string The string to search within.\r
206      */\r
207     [Symbol.search](string: string): number;\r
208 \r
209     /**\r
210      * Returns an array of substrings that were delimited by strings in the original input that\r
211      * match against this regular expression.\r
212      *\r
213      * If the regular expression contains capturing parentheses, then each time this\r
214      * regular expression matches, the results (including any undefined results) of the\r
215      * capturing parentheses are spliced.\r
216      *\r
217      * @param string string value to split\r
218      * @param limit if not undefined, the output array is truncated so that it contains no more\r
219      * than 'limit' elements.\r
220      */\r
221     [Symbol.split](string: string, limit?: number): string[];\r
222 }\r
223 \r
224 interface RegExpConstructor {\r
225     readonly [Symbol.species]: RegExpConstructor;\r
226 }\r
227 \r
228 interface String {\r
229     /**\r
230      * Matches a string or an object that supports being matched against, and returns an array\r
231      * containing the results of that search, or null if no matches are found.\r
232      * @param matcher An object that supports being matched against.\r
233      */\r
234     match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;\r
235 \r
236     /**\r
237      * Replaces text in a string, using an object that supports replacement within a string.\r
238      * @param searchValue A object can search for and replace matches within a string.\r
239      * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r
240      */\r
241     replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;\r
242 \r
243     /**\r
244      * Replaces text in a string, using an object that supports replacement within a string.\r
245      * @param searchValue A object can search for and replace matches within a string.\r
246      * @param replacer A function that returns the replacement text.\r
247      */\r
248     replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;\r
249 \r
250     /**\r
251      * Finds the first substring match in a regular expression search.\r
252      * @param searcher An object which supports searching within a string.\r
253      */\r
254     search(searcher: { [Symbol.search](string: string): number; }): number;\r
255 \r
256     /**\r
257      * Split a string into substrings using the specified separator and return them as an array.\r
258      * @param splitter An object that can split a string.\r
259      * @param limit A value used to limit the number of elements returned in the array.\r
260      */\r
261     split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];\r
262 }\r
263 \r
264 interface ArrayBuffer {\r
265     readonly [Symbol.toStringTag]: string;\r
266 }\r
267 \r
268 interface DataView {\r
269     readonly [Symbol.toStringTag]: string;\r
270 }\r
271 \r
272 interface Int8Array {\r
273     readonly [Symbol.toStringTag]: "Int8Array";\r
274 }\r
275 \r
276 interface Uint8Array {\r
277     readonly [Symbol.toStringTag]: "Uint8Array";\r
278 }\r
279 \r
280 interface Uint8ClampedArray {\r
281     readonly [Symbol.toStringTag]: "Uint8ClampedArray";\r
282 }\r
283 \r
284 interface Int16Array {\r
285     readonly [Symbol.toStringTag]: "Int16Array";\r
286 }\r
287 \r
288 interface Uint16Array {\r
289     readonly [Symbol.toStringTag]: "Uint16Array";\r
290 }\r
291 \r
292 interface Int32Array {\r
293     readonly [Symbol.toStringTag]: "Int32Array";\r
294 }\r
295 \r
296 interface Uint32Array {\r
297     readonly [Symbol.toStringTag]: "Uint32Array";\r
298 }\r
299 \r
300 interface Float32Array {\r
301     readonly [Symbol.toStringTag]: "Float32Array";\r
302 }\r
303 \r
304 interface Float64Array {\r
305     readonly [Symbol.toStringTag]: "Float64Array";\r
306 }\r
307 \r
308 interface ArrayConstructor {\r
309     readonly [Symbol.species]: ArrayConstructor;\r
310 }\r
311 interface MapConstructor {\r
312     readonly [Symbol.species]: MapConstructor;\r
313 }\r
314 interface SetConstructor {\r
315     readonly [Symbol.species]: SetConstructor;\r
316 }\r
317 interface ArrayBufferConstructor {\r
318     readonly [Symbol.species]: ArrayBufferConstructor;\r
319 }\r