Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-tsserver / 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     /**\r
87      * Converts a Symbol object to a symbol.\r
88      */\r
89     [Symbol.toPrimitive](hint: string): symbol;\r
90 \r
91     readonly [Symbol.toStringTag]: string;\r
92 }\r
93 \r
94 interface Array<T> {\r
95     /**\r
96      * Returns an object whose properties have the value 'true'\r
97      * when they will be absent when used in a 'with' statement.\r
98      */\r
99     [Symbol.unscopables](): {\r
100         copyWithin: boolean;\r
101         entries: boolean;\r
102         fill: boolean;\r
103         find: boolean;\r
104         findIndex: boolean;\r
105         keys: boolean;\r
106         values: boolean;\r
107     };\r
108 }\r
109 \r
110 interface Date {\r
111     /**\r
112      * Converts a Date object to a string.\r
113      */\r
114     [Symbol.toPrimitive](hint: "default"): string;\r
115     /**\r
116      * Converts a Date object to a string.\r
117      */\r
118     [Symbol.toPrimitive](hint: "string"): string;\r
119     /**\r
120      * Converts a Date object to a number.\r
121      */\r
122     [Symbol.toPrimitive](hint: "number"): number;\r
123     /**\r
124      * Converts a Date object to a string or number.\r
125      *\r
126      * @param hint The strings "number", "string", or "default" to specify what primitive to return.\r
127      *\r
128      * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".\r
129      * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".\r
130      */\r
131     [Symbol.toPrimitive](hint: string): string | number;\r
132 }\r
133 \r
134 interface Map<K, V> {\r
135     readonly [Symbol.toStringTag]: string;\r
136 }\r
137 \r
138 interface WeakMap<K extends object, V> {\r
139     readonly [Symbol.toStringTag]: string;\r
140 }\r
141 \r
142 interface Set<T> {\r
143     readonly [Symbol.toStringTag]: string;\r
144 }\r
145 \r
146 interface WeakSet<T extends object> {\r
147     readonly [Symbol.toStringTag]: string;\r
148 }\r
149 \r
150 interface JSON {\r
151     readonly [Symbol.toStringTag]: string;\r
152 }\r
153 \r
154 interface Function {\r
155     /**\r
156      * Determines whether the given value inherits from this function if this function was used\r
157      * as a constructor function.\r
158      *\r
159      * A constructor function can control which objects are recognized as its instances by\r
160      * 'instanceof' by overriding this method.\r
161      */\r
162     [Symbol.hasInstance](value: any): boolean;\r
163 }\r
164 \r
165 interface GeneratorFunction {\r
166     readonly [Symbol.toStringTag]: string;\r
167 }\r
168 \r
169 interface Math {\r
170     readonly [Symbol.toStringTag]: string;\r
171 }\r
172 \r
173 interface Promise<T> {\r
174     readonly [Symbol.toStringTag]: string;\r
175 }\r
176 \r
177 interface PromiseConstructor {\r
178     readonly [Symbol.species]: PromiseConstructor;\r
179 }\r
180 \r
181 interface RegExp {\r
182     /**\r
183      * Matches a string with this regular expression, and returns an array containing the results of\r
184      * that search.\r
185      * @param string A string to search within.\r
186      */\r
187     [Symbol.match](string: string): RegExpMatchArray | null;\r
188 \r
189     /**\r
190      * Replaces text in a string, using this regular expression.\r
191      * @param string A String object or string literal whose contents matching against\r
192      *               this regular expression will be replaced\r
193      * @param replaceValue A String object or string literal containing the text to replace for every\r
194      *                     successful match of this regular expression.\r
195      */\r
196     [Symbol.replace](string: string, replaceValue: string): string;\r
197 \r
198     /**\r
199      * Replaces text in a string, using this regular expression.\r
200      * @param string A String object or string literal whose contents matching against\r
201      *               this regular expression will be replaced\r
202      * @param replacer A function that returns the replacement text.\r
203      */\r
204     [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;\r
205 \r
206     /**\r
207      * Finds the position beginning first substring match in a regular expression search\r
208      * using this regular expression.\r
209      *\r
210      * @param string The string to search within.\r
211      */\r
212     [Symbol.search](string: string): number;\r
213 \r
214     /**\r
215      * Returns an array of substrings that were delimited by strings in the original input that\r
216      * match against this regular expression.\r
217      *\r
218      * If the regular expression contains capturing parentheses, then each time this\r
219      * regular expression matches, the results (including any undefined results) of the\r
220      * capturing parentheses are spliced.\r
221      *\r
222      * @param string string value to split\r
223      * @param limit if not undefined, the output array is truncated so that it contains no more\r
224      * than 'limit' elements.\r
225      */\r
226     [Symbol.split](string: string, limit?: number): string[];\r
227 }\r
228 \r
229 interface RegExpConstructor {\r
230     readonly [Symbol.species]: RegExpConstructor;\r
231 }\r
232 \r
233 interface String {\r
234     /**\r
235      * Matches a string or an object that supports being matched against, and returns an array\r
236      * containing the results of that search, or null if no matches are found.\r
237      * @param matcher An object that supports being matched against.\r
238      */\r
239     match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;\r
240 \r
241     /**\r
242      * Replaces text in a string, using an object that supports replacement within a string.\r
243      * @param searchValue A object can search for and replace matches within a string.\r
244      * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r
245      */\r
246     replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;\r
247 \r
248     /**\r
249      * Replaces text in a string, using an object that supports replacement within a string.\r
250      * @param searchValue A object can search for and replace matches within a string.\r
251      * @param replacer A function that returns the replacement text.\r
252      */\r
253     replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;\r
254 \r
255     /**\r
256      * Finds the first substring match in a regular expression search.\r
257      * @param searcher An object which supports searching within a string.\r
258      */\r
259     search(searcher: { [Symbol.search](string: string): number; }): number;\r
260 \r
261     /**\r
262      * Split a string into substrings using the specified separator and return them as an array.\r
263      * @param splitter An object that can split a string.\r
264      * @param limit A value used to limit the number of elements returned in the array.\r
265      */\r
266     split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];\r
267 }\r
268 \r
269 interface ArrayBuffer {\r
270     readonly [Symbol.toStringTag]: string;\r
271 }\r
272 \r
273 interface DataView {\r
274     readonly [Symbol.toStringTag]: string;\r
275 }\r
276 \r
277 interface Int8Array {\r
278     readonly [Symbol.toStringTag]: "Int8Array";\r
279 }\r
280 \r
281 interface Uint8Array {\r
282     readonly [Symbol.toStringTag]: "Uint8Array";\r
283 }\r
284 \r
285 interface Uint8ClampedArray {\r
286     readonly [Symbol.toStringTag]: "Uint8ClampedArray";\r
287 }\r
288 \r
289 interface Int16Array {\r
290     readonly [Symbol.toStringTag]: "Int16Array";\r
291 }\r
292 \r
293 interface Uint16Array {\r
294     readonly [Symbol.toStringTag]: "Uint16Array";\r
295 }\r
296 \r
297 interface Int32Array {\r
298     readonly [Symbol.toStringTag]: "Int32Array";\r
299 }\r
300 \r
301 interface Uint32Array {\r
302     readonly [Symbol.toStringTag]: "Uint32Array";\r
303 }\r
304 \r
305 interface Float32Array {\r
306     readonly [Symbol.toStringTag]: "Float32Array";\r
307 }\r
308 \r
309 interface Float64Array {\r
310     readonly [Symbol.toStringTag]: "Float64Array";\r
311 }\r
312 \r
313 interface ArrayConstructor {\r
314     readonly [Symbol.species]: ArrayConstructor;\r
315 }\r
316 interface MapConstructor {\r
317     readonly [Symbol.species]: MapConstructor;\r
318 }\r
319 interface SetConstructor {\r
320     readonly [Symbol.species]: SetConstructor;\r
321 }\r
322 interface ArrayBufferConstructor {\r
323     readonly [Symbol.species]: ArrayBufferConstructor;\r
324 }\r