@stripe/extensibility-sdk 0.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/LICENSE.md +19 -0
  2. package/dist/config-values/generate.cjs +262 -0
  3. package/dist/config-values/generate.d.ts +38 -0
  4. package/dist/config-values/generate.d.ts.map +1 -0
  5. package/dist/config-values/generate.js +232 -0
  6. package/dist/config-values/parse.d.ts +87 -0
  7. package/dist/config-values/parse.d.ts.map +1 -0
  8. package/dist/extensibility-sdk-alpha.d.ts +542 -0
  9. package/dist/extensibility-sdk-beta.d.ts +542 -0
  10. package/dist/extensibility-sdk-config-values-alpha.d.ts +27 -0
  11. package/dist/extensibility-sdk-config-values-beta.d.ts +27 -0
  12. package/dist/extensibility-sdk-config-values-internal.d.ts +118 -0
  13. package/dist/extensibility-sdk-config-values-public.d.ts +27 -0
  14. package/dist/extensibility-sdk-extensions-alpha.d.ts +1592 -0
  15. package/dist/extensibility-sdk-extensions-beta.d.ts +1592 -0
  16. package/dist/extensibility-sdk-extensions-internal.d.ts +1655 -0
  17. package/dist/extensibility-sdk-extensions-public.d.ts +1592 -0
  18. package/dist/extensibility-sdk-internal-alpha.d.ts +9 -0
  19. package/dist/extensibility-sdk-internal-beta.d.ts +9 -0
  20. package/dist/extensibility-sdk-internal-internal.d.ts +23 -0
  21. package/dist/extensibility-sdk-internal-public.d.ts +9 -0
  22. package/dist/extensibility-sdk-internal.d.ts +915 -0
  23. package/dist/extensibility-sdk-jsonschema-alpha.d.ts +3 -0
  24. package/dist/extensibility-sdk-jsonschema-beta.d.ts +3 -0
  25. package/dist/extensibility-sdk-jsonschema-internal.d.ts +15 -0
  26. package/dist/extensibility-sdk-jsonschema-public.d.ts +3 -0
  27. package/dist/extensibility-sdk-public.d.ts +542 -0
  28. package/dist/extensibility-sdk-stdlib-alpha.d.ts +531 -0
  29. package/dist/extensibility-sdk-stdlib-beta.d.ts +531 -0
  30. package/dist/extensibility-sdk-stdlib-internal.d.ts +904 -0
  31. package/dist/extensibility-sdk-stdlib-public.d.ts +531 -0
  32. package/dist/extensions/billing/bill/discount_calculation.d.ts +226 -0
  33. package/dist/extensions/billing/bill/discount_calculation.d.ts.map +1 -0
  34. package/dist/extensions/billing/bill/index.d.ts +2 -0
  35. package/dist/extensions/billing/bill/index.d.ts.map +1 -0
  36. package/dist/extensions/billing/customer_balance_application.d.ts +82 -0
  37. package/dist/extensions/billing/customer_balance_application.d.ts.map +1 -0
  38. package/dist/extensions/billing/index.d.ts +8 -0
  39. package/dist/extensions/billing/index.d.ts.map +1 -0
  40. package/dist/extensions/billing/invoice_collection_setting.d.ts +117 -0
  41. package/dist/extensions/billing/invoice_collection_setting.d.ts.map +1 -0
  42. package/dist/extensions/billing/prorations.d.ts +222 -0
  43. package/dist/extensions/billing/prorations.d.ts.map +1 -0
  44. package/dist/extensions/billing/recurring_billing_item_handling.d.ts +326 -0
  45. package/dist/extensions/billing/recurring_billing_item_handling.d.ts.map +1 -0
  46. package/dist/extensions/billing/types.d.ts +33 -0
  47. package/dist/extensions/billing/types.d.ts.map +1 -0
  48. package/dist/extensions/context.d.ts +9 -0
  49. package/dist/extensions/context.d.ts.map +1 -0
  50. package/dist/extensions/core/index.d.ts +3 -0
  51. package/dist/extensions/core/index.d.ts.map +1 -0
  52. package/dist/extensions/core/workflows/custom_action.d.ts +142 -0
  53. package/dist/extensions/core/workflows/custom_action.d.ts.map +1 -0
  54. package/dist/extensions/core/workflows/index.d.ts +2 -0
  55. package/dist/extensions/core/workflows/index.d.ts.map +1 -0
  56. package/dist/extensions/extend/index.d.ts +3 -0
  57. package/dist/extensions/extend/index.d.ts.map +1 -0
  58. package/dist/extensions/extend/workflows/custom_action.d.ts +142 -0
  59. package/dist/extensions/extend/workflows/custom_action.d.ts.map +1 -0
  60. package/dist/extensions/extend/workflows/index.d.ts +2 -0
  61. package/dist/extensions/extend/workflows/index.d.ts.map +1 -0
  62. package/dist/extensions/index.cjs +2356 -0
  63. package/dist/extensions/index.d.ts +9 -0
  64. package/dist/extensions/index.d.ts.map +1 -0
  65. package/dist/extensions/index.js +2435 -0
  66. package/dist/extensions/registry.d.ts +19 -0
  67. package/dist/extensions/registry.d.ts.map +1 -0
  68. package/dist/extensions/types.d.ts +10 -0
  69. package/dist/extensions/types.d.ts.map +1 -0
  70. package/dist/index.cjs +1519 -0
  71. package/dist/index.d.ts +12 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +1460 -0
  74. package/dist/internal.cjs +156 -0
  75. package/dist/internal.d.ts +3 -0
  76. package/dist/internal.d.ts.map +1 -0
  77. package/dist/internal.js +128 -0
  78. package/dist/jsonschema.cjs +18 -0
  79. package/dist/jsonschema.d.ts +2 -0
  80. package/dist/jsonschema.d.ts.map +1 -0
  81. package/dist/jsonschema.js +0 -0
  82. package/dist/stdlib/brand.d.ts +27 -0
  83. package/dist/stdlib/brand.d.ts.map +1 -0
  84. package/dist/stdlib/decimal.d.ts +324 -0
  85. package/dist/stdlib/decimal.d.ts.map +1 -0
  86. package/dist/stdlib/extension-method.d.ts +27 -0
  87. package/dist/stdlib/extension-method.d.ts.map +1 -0
  88. package/dist/stdlib/generated.d.ts +15 -0
  89. package/dist/stdlib/generated.d.ts.map +1 -0
  90. package/dist/stdlib/index.cjs +1519 -0
  91. package/dist/stdlib/index.d.ts +18 -0
  92. package/dist/stdlib/index.d.ts.map +1 -0
  93. package/dist/stdlib/index.js +1460 -0
  94. package/dist/stdlib/refs.d.ts +62 -0
  95. package/dist/stdlib/refs.d.ts.map +1 -0
  96. package/dist/stdlib/scalars.d.ts +141 -0
  97. package/dist/stdlib/scalars.d.ts.map +1 -0
  98. package/dist/stdlib/transform-strategies.d.ts +74 -0
  99. package/dist/stdlib/transform-strategies.d.ts.map +1 -0
  100. package/dist/stdlib/transforms.d.ts +97 -0
  101. package/dist/stdlib/transforms.d.ts.map +1 -0
  102. package/dist/stdlib/type-utils.d.ts +9 -0
  103. package/dist/stdlib/type-utils.d.ts.map +1 -0
  104. package/dist/stdlib/types.d.ts +281 -0
  105. package/dist/stdlib/types.d.ts.map +1 -0
  106. package/dist/stdlib/utils.d.ts +7 -0
  107. package/dist/stdlib/utils.d.ts.map +1 -0
  108. package/dist/tsconfig.build.tsbuildinfo +1 -0
  109. package/package.json +111 -0
  110. package/tslibs/5.9.3/lib.es2022.egress.d.ts +4328 -0
  111. package/tslibs/5.9.3/lib.es2022.restricted.d.ts +4067 -0
  112. package/tslibs/lib.egress.globals.d.ts +112 -0
  113. package/tslibs/lib.restricted.globals.d.ts +1 -0
@@ -0,0 +1,4067 @@
1
+ // Generated from TypeScript 5.9.3 libs for 9
2
+ // This file is a modified version of the original TypeScript library files.
3
+ /// <reference no-default-lib="true"/>
4
+
5
+ /*! *****************************************************************************
6
+ Copyright (c) Microsoft Corporation. All rights reserved.
7
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
8
+ this file except in compliance with the License. You may obtain a copy of the
9
+ License at http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
12
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
13
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
14
+ MERCHANTABLITY OR NON-INFRINGEMENT.
15
+
16
+ See the Apache Version 2.0 License for specific language governing permissions
17
+ and limitations under the License.
18
+ ***************************************************************************** */
19
+
20
+ // #region decorators TypeScript lib content
21
+ /**
22
+ * The decorator context types provided to class element decorators.
23
+ */
24
+ type ClassMemberDecoratorContext =
25
+ | ClassMethodDecoratorContext
26
+ | ClassGetterDecoratorContext
27
+ | ClassSetterDecoratorContext
28
+ | ClassFieldDecoratorContext
29
+ | ClassAccessorDecoratorContext;
30
+
31
+ /**
32
+ * The decorator context types provided to any decorator.
33
+ */
34
+ type DecoratorContext = ClassDecoratorContext | ClassMemberDecoratorContext;
35
+
36
+ type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
37
+
38
+ type DecoratorMetadata = typeof globalThis extends {
39
+ Symbol: {readonly metadata: symbol};
40
+ }
41
+ ? DecoratorMetadataObject
42
+ : DecoratorMetadataObject | undefined;
43
+
44
+ /**
45
+ * Context provided to a class decorator.
46
+ * @template Class The type of the decorated class associated with this context.
47
+ */
48
+ interface ClassDecoratorContext<
49
+ Class extends abstract new (...args: any) => any = abstract new (
50
+ ...args: any
51
+ ) => any,
52
+ > {
53
+ /** The kind of element that was decorated. */
54
+ readonly kind: 'class';
55
+
56
+ /** The name of the decorated class. */
57
+ readonly name: string | undefined;
58
+
59
+ /**
60
+ * Adds a callback to be invoked after the class definition has been finalized.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * function customElement(name: string): ClassDecoratorFunction {
65
+ * return (target, context) => {
66
+ * context.addInitializer(function () {
67
+ * customElements.define(name, this);
68
+ * });
69
+ * }
70
+ * }
71
+ *
72
+ * @customElement("my-element")
73
+ * class MyElement {}
74
+ * ```
75
+ */
76
+ addInitializer(initializer: (this: Class) => void): void;
77
+
78
+ readonly metadata: DecoratorMetadata;
79
+ }
80
+
81
+ /**
82
+ * Context provided to a class method decorator.
83
+ * @template This The type on which the class element will be defined. For a static class element, this will be
84
+ * the type of the constructor. For a non-static class element, this will be the type of the instance.
85
+ * @template Value The type of the decorated class method.
86
+ */
87
+ interface ClassMethodDecoratorContext<
88
+ This = unknown,
89
+ Value extends (this: This, ...args: any) => any = (
90
+ this: This,
91
+ ...args: any
92
+ ) => any,
93
+ > {
94
+ /** The kind of class element that was decorated. */
95
+ readonly kind: 'method';
96
+
97
+ /** The name of the decorated class element. */
98
+ readonly name: string | symbol;
99
+
100
+ /** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
101
+ readonly static: boolean;
102
+
103
+ /** A value indicating whether the class element has a private name. */
104
+ readonly private: boolean;
105
+
106
+ /** An object that can be used to access the current value of the class element at runtime. */
107
+ readonly access: {
108
+ /**
109
+ * Determines whether an object has a property with the same name as the decorated element.
110
+ */
111
+ has(object: This): boolean;
112
+ /**
113
+ * Gets the current value of the method from the provided object.
114
+ *
115
+ * @example
116
+ * let fn = context.access.get(instance);
117
+ */
118
+ get(object: This): Value;
119
+ };
120
+
121
+ /**
122
+ * Adds a callback to be invoked either after static methods are defined but before
123
+ * static initializers are run (when decorating a `static` element), or before instance
124
+ * initializers are run (when decorating a non-`static` element).
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const bound: ClassMethodDecoratorFunction = (value, context) {
129
+ * if (context.private) throw new TypeError("Not supported on private methods.");
130
+ * context.addInitializer(function () {
131
+ * this[context.name] = this[context.name].bind(this);
132
+ * });
133
+ * }
134
+ *
135
+ * class C {
136
+ * message = "Hello";
137
+ *
138
+ * @bound
139
+ * m() {
140
+ * console.log(this.message);
141
+ * }
142
+ * }
143
+ * ```
144
+ */
145
+ addInitializer(initializer: (this: This) => void): void;
146
+
147
+ readonly metadata: DecoratorMetadata;
148
+ }
149
+
150
+ /**
151
+ * Context provided to a class getter decorator.
152
+ * @template This The type on which the class element will be defined. For a static class element, this will be
153
+ * the type of the constructor. For a non-static class element, this will be the type of the instance.
154
+ * @template Value The property type of the decorated class getter.
155
+ */
156
+ interface ClassGetterDecoratorContext<This = unknown, Value = unknown> {
157
+ /** The kind of class element that was decorated. */
158
+ readonly kind: 'getter';
159
+
160
+ /** The name of the decorated class element. */
161
+ readonly name: string | symbol;
162
+
163
+ /** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
164
+ readonly static: boolean;
165
+
166
+ /** A value indicating whether the class element has a private name. */
167
+ readonly private: boolean;
168
+
169
+ /** An object that can be used to access the current value of the class element at runtime. */
170
+ readonly access: {
171
+ /**
172
+ * Determines whether an object has a property with the same name as the decorated element.
173
+ */
174
+ has(object: This): boolean;
175
+ /**
176
+ * Invokes the getter on the provided object.
177
+ *
178
+ * @example
179
+ * let value = context.access.get(instance);
180
+ */
181
+ get(object: This): Value;
182
+ };
183
+
184
+ /**
185
+ * Adds a callback to be invoked either after static methods are defined but before
186
+ * static initializers are run (when decorating a `static` element), or before instance
187
+ * initializers are run (when decorating a non-`static` element).
188
+ */
189
+ addInitializer(initializer: (this: This) => void): void;
190
+
191
+ readonly metadata: DecoratorMetadata;
192
+ }
193
+
194
+ /**
195
+ * Context provided to a class setter decorator.
196
+ * @template This The type on which the class element will be defined. For a static class element, this will be
197
+ * the type of the constructor. For a non-static class element, this will be the type of the instance.
198
+ * @template Value The type of the decorated class setter.
199
+ */
200
+ interface ClassSetterDecoratorContext<This = unknown, Value = unknown> {
201
+ /** The kind of class element that was decorated. */
202
+ readonly kind: 'setter';
203
+
204
+ /** The name of the decorated class element. */
205
+ readonly name: string | symbol;
206
+
207
+ /** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
208
+ readonly static: boolean;
209
+
210
+ /** A value indicating whether the class element has a private name. */
211
+ readonly private: boolean;
212
+
213
+ /** An object that can be used to access the current value of the class element at runtime. */
214
+ readonly access: {
215
+ /**
216
+ * Determines whether an object has a property with the same name as the decorated element.
217
+ */
218
+ has(object: This): boolean;
219
+ /**
220
+ * Invokes the setter on the provided object.
221
+ *
222
+ * @example
223
+ * context.access.set(instance, value);
224
+ */
225
+ set(object: This, value: Value): void;
226
+ };
227
+
228
+ /**
229
+ * Adds a callback to be invoked either after static methods are defined but before
230
+ * static initializers are run (when decorating a `static` element), or before instance
231
+ * initializers are run (when decorating a non-`static` element).
232
+ */
233
+ addInitializer(initializer: (this: This) => void): void;
234
+
235
+ readonly metadata: DecoratorMetadata;
236
+ }
237
+
238
+ /**
239
+ * Context provided to a class `accessor` field decorator.
240
+ * @template This The type on which the class element will be defined. For a static class element, this will be
241
+ * the type of the constructor. For a non-static class element, this will be the type of the instance.
242
+ * @template Value The type of decorated class field.
243
+ */
244
+ interface ClassAccessorDecoratorContext<This = unknown, Value = unknown> {
245
+ /** The kind of class element that was decorated. */
246
+ readonly kind: 'accessor';
247
+
248
+ /** The name of the decorated class element. */
249
+ readonly name: string | symbol;
250
+
251
+ /** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
252
+ readonly static: boolean;
253
+
254
+ /** A value indicating whether the class element has a private name. */
255
+ readonly private: boolean;
256
+
257
+ /** An object that can be used to access the current value of the class element at runtime. */
258
+ readonly access: {
259
+ /**
260
+ * Determines whether an object has a property with the same name as the decorated element.
261
+ */
262
+ has(object: This): boolean;
263
+
264
+ /**
265
+ * Invokes the getter on the provided object.
266
+ *
267
+ * @example
268
+ * let value = context.access.get(instance);
269
+ */
270
+ get(object: This): Value;
271
+
272
+ /**
273
+ * Invokes the setter on the provided object.
274
+ *
275
+ * @example
276
+ * context.access.set(instance, value);
277
+ */
278
+ set(object: This, value: Value): void;
279
+ };
280
+
281
+ /**
282
+ * Adds a callback to be invoked immediately after the auto `accessor` being
283
+ * decorated is initialized (regardless if the `accessor` is `static` or not).
284
+ */
285
+ addInitializer(initializer: (this: This) => void): void;
286
+
287
+ readonly metadata: DecoratorMetadata;
288
+ }
289
+
290
+ /**
291
+ * Describes the target provided to class `accessor` field decorators.
292
+ * @template This The `this` type to which the target applies.
293
+ * @template Value The property type for the class `accessor` field.
294
+ */
295
+ interface ClassAccessorDecoratorTarget<This, Value> {
296
+ /**
297
+ * Invokes the getter that was defined prior to decorator application.
298
+ *
299
+ * @example
300
+ * let value = target.get.call(instance);
301
+ */
302
+ get(this: This): Value;
303
+
304
+ /**
305
+ * Invokes the setter that was defined prior to decorator application.
306
+ *
307
+ * @example
308
+ * target.set.call(instance, value);
309
+ */
310
+ set(this: This, value: Value): void;
311
+ }
312
+
313
+ /**
314
+ * Describes the allowed return value from a class `accessor` field decorator.
315
+ * @template This The `this` type to which the target applies.
316
+ * @template Value The property type for the class `accessor` field.
317
+ */
318
+ interface ClassAccessorDecoratorResult<This, Value> {
319
+ /**
320
+ * An optional replacement getter function. If not provided, the existing getter function is used instead.
321
+ */
322
+ get?(this: This): Value;
323
+
324
+ /**
325
+ * An optional replacement setter function. If not provided, the existing setter function is used instead.
326
+ */
327
+ set?(this: This, value: Value): void;
328
+
329
+ /**
330
+ * An optional initializer mutator that is invoked when the underlying field initializer is evaluated.
331
+ * @param value The incoming initializer value.
332
+ * @returns The replacement initializer value.
333
+ */
334
+ init?(this: This, value: Value): Value;
335
+ }
336
+
337
+ /**
338
+ * Context provided to a class field decorator.
339
+ * @template This The type on which the class element will be defined. For a static class element, this will be
340
+ * the type of the constructor. For a non-static class element, this will be the type of the instance.
341
+ * @template Value The type of the decorated class field.
342
+ */
343
+ interface ClassFieldDecoratorContext<This = unknown, Value = unknown> {
344
+ /** The kind of class element that was decorated. */
345
+ readonly kind: 'field';
346
+
347
+ /** The name of the decorated class element. */
348
+ readonly name: string | symbol;
349
+
350
+ /** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
351
+ readonly static: boolean;
352
+
353
+ /** A value indicating whether the class element has a private name. */
354
+ readonly private: boolean;
355
+
356
+ /** An object that can be used to access the current value of the class element at runtime. */
357
+ readonly access: {
358
+ /**
359
+ * Determines whether an object has a property with the same name as the decorated element.
360
+ */
361
+ has(object: This): boolean;
362
+
363
+ /**
364
+ * Gets the value of the field on the provided object.
365
+ */
366
+ get(object: This): Value;
367
+
368
+ /**
369
+ * Sets the value of the field on the provided object.
370
+ */
371
+ set(object: This, value: Value): void;
372
+ };
373
+
374
+ /**
375
+ * Adds a callback to be invoked immediately after the field being decorated
376
+ * is initialized (regardless if the field is `static` or not).
377
+ */
378
+ addInitializer(initializer: (this: This) => void): void;
379
+
380
+ readonly metadata: DecoratorMetadata;
381
+ }
382
+ // #endregion
383
+
384
+ // #region decorators.legacy TypeScript lib content
385
+ declare type ClassDecorator = <TFunction extends Function>(
386
+ target: TFunction,
387
+ ) => TFunction | void;
388
+ declare type PropertyDecorator = (
389
+ target: Object,
390
+ propertyKey: string | symbol,
391
+ ) => void;
392
+ declare type MethodDecorator = <T>(
393
+ target: Object,
394
+ propertyKey: string | symbol,
395
+ descriptor: TypedPropertyDescriptor<T>,
396
+ ) => TypedPropertyDescriptor<T> | void;
397
+ declare type ParameterDecorator = (
398
+ target: Object,
399
+ propertyKey: string | symbol | undefined,
400
+ parameterIndex: number,
401
+ ) => void;
402
+ // #endregion
403
+
404
+ // #region es5 TypeScript lib content
405
+ /////////////////////////////
406
+ /// ECMAScript APIs
407
+ /////////////////////////////
408
+
409
+ declare var NaN: number;
410
+ declare var Infinity: number;
411
+
412
+ /**
413
+ * Converts a string to an integer.
414
+ * @param string A string to convert into a number.
415
+ * @param radix A value between 2 and 36 that specifies the base of the number in `string`.
416
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
417
+ * All other strings are considered decimal.
418
+ */
419
+ declare function parseInt(string: string, radix?: number): number;
420
+
421
+ /**
422
+ * Converts a string to a floating-point number.
423
+ * @param string A string that contains a floating-point number.
424
+ */
425
+ declare function parseFloat(string: string): number;
426
+
427
+ /**
428
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
429
+ * @param number A numeric value.
430
+ */
431
+ declare function isNaN(number: number): boolean;
432
+
433
+ /**
434
+ * Determines whether a supplied number is finite.
435
+ * @param number Any numeric value.
436
+ */
437
+ declare function isFinite(number: number): boolean;
438
+
439
+ /**
440
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
441
+ * @param encodedURI A value representing an encoded URI.
442
+ */
443
+ declare function decodeURI(encodedURI: string): string;
444
+
445
+ /**
446
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
447
+ * @param encodedURIComponent A value representing an encoded URI component.
448
+ */
449
+ declare function decodeURIComponent(encodedURIComponent: string): string;
450
+
451
+ /**
452
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
453
+ * @param uri A value representing an unencoded URI.
454
+ */
455
+ declare function encodeURI(uri: string): string;
456
+
457
+ /**
458
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
459
+ * @param uriComponent A value representing an unencoded URI component.
460
+ */
461
+ declare function encodeURIComponent(
462
+ uriComponent: string | number | boolean,
463
+ ): string;
464
+
465
+ /**
466
+ * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
467
+ * @deprecated A legacy feature for browser compatibility
468
+ * @param string A string value
469
+ */
470
+ declare function escape(string: string): string;
471
+
472
+ /**
473
+ * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
474
+ * @deprecated A legacy feature for browser compatibility
475
+ * @param string A string value
476
+ */
477
+ declare function unescape(string: string): string;
478
+
479
+ interface Symbol {
480
+ /** Returns a string representation of an object. */
481
+ toString(): string;
482
+
483
+ /** Returns the primitive value of the specified object. */
484
+ valueOf(): symbol;
485
+ }
486
+
487
+ declare type PropertyKey = string | number | symbol;
488
+
489
+ interface PropertyDescriptor {
490
+ configurable?: boolean;
491
+ enumerable?: boolean;
492
+ value?: any;
493
+ writable?: boolean;
494
+ get?(): any;
495
+ set?(v: any): void;
496
+ }
497
+
498
+ interface PropertyDescriptorMap {
499
+ [key: PropertyKey]: PropertyDescriptor;
500
+ }
501
+
502
+ interface Object {
503
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
504
+ constructor: Function;
505
+
506
+ /** Returns a string representation of an object. */
507
+ toString(): string;
508
+
509
+ /** Returns a date converted to a string using the current locale. */
510
+ toLocaleString(): string;
511
+
512
+ /** Returns the primitive value of the specified object. */
513
+ valueOf(): Object;
514
+
515
+ /**
516
+ * Determines whether an object has a property with the specified name.
517
+ * @param v A property name.
518
+ */
519
+ hasOwnProperty(v: PropertyKey): boolean;
520
+
521
+ /**
522
+ * Determines whether an object exists in another object's prototype chain.
523
+ * @param v Another object whose prototype chain is to be checked.
524
+ */
525
+ isPrototypeOf(v: Object): boolean;
526
+
527
+ /**
528
+ * Determines whether a specified property is enumerable.
529
+ * @param v A property name.
530
+ */
531
+ propertyIsEnumerable(v: PropertyKey): boolean;
532
+ }
533
+
534
+ interface ObjectConstructor {
535
+ new (value?: any): Object;
536
+ (): any;
537
+ (value: any): any;
538
+
539
+ /** A reference to the prototype for a class of objects. */
540
+ readonly prototype: Object;
541
+
542
+ /**
543
+ * Returns the prototype of an object.
544
+ * @param o The object that references the prototype.
545
+ */
546
+ getPrototypeOf(o: any): any;
547
+
548
+ /**
549
+ * Gets the own property descriptor of the specified object.
550
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
551
+ * @param o Object that contains the property.
552
+ * @param p Name of the property.
553
+ */
554
+ getOwnPropertyDescriptor(
555
+ o: any,
556
+ p: PropertyKey,
557
+ ): PropertyDescriptor | undefined;
558
+
559
+ /**
560
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
561
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
562
+ * @param o Object that contains the own properties.
563
+ */
564
+ getOwnPropertyNames(o: any): string[];
565
+
566
+ /**
567
+ * Creates an object that has the specified prototype or that has null prototype.
568
+ * @param o Object to use as a prototype. May be null.
569
+ */
570
+ create(o: object | null): any;
571
+
572
+ /**
573
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
574
+ * @param o Object to use as a prototype. May be null
575
+ * @param properties JavaScript object that contains one or more property descriptors.
576
+ */
577
+ create(
578
+ o: object | null,
579
+ properties: PropertyDescriptorMap & ThisType<any>,
580
+ ): any;
581
+
582
+ /**
583
+ * Adds a property to an object, or modifies attributes of an existing property.
584
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
585
+ * @param p The property name.
586
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
587
+ */
588
+ defineProperty<T>(
589
+ o: T,
590
+ p: PropertyKey,
591
+ attributes: PropertyDescriptor & ThisType<any>,
592
+ ): T;
593
+
594
+ /**
595
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
596
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
597
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
598
+ */
599
+ defineProperties<T>(
600
+ o: T,
601
+ properties: PropertyDescriptorMap & ThisType<any>,
602
+ ): T;
603
+
604
+ /**
605
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
606
+ * @param o Object on which to lock the attributes.
607
+ */
608
+ seal<T>(o: T): T;
609
+
610
+ /**
611
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
612
+ * @param f Object on which to lock the attributes.
613
+ */
614
+ freeze<T extends Function>(f: T): T;
615
+
616
+ /**
617
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
618
+ * @param o Object on which to lock the attributes.
619
+ */
620
+ freeze<
621
+ T extends {[idx: string]: U | null | undefined | object},
622
+ U extends string | bigint | number | boolean | symbol,
623
+ >(
624
+ o: T,
625
+ ): Readonly<T>;
626
+
627
+ /**
628
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
629
+ * @param o Object on which to lock the attributes.
630
+ */
631
+ freeze<T>(o: T): Readonly<T>;
632
+
633
+ /**
634
+ * Prevents the addition of new properties to an object.
635
+ * @param o Object to make non-extensible.
636
+ */
637
+ preventExtensions<T>(o: T): T;
638
+
639
+ /**
640
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
641
+ * @param o Object to test.
642
+ */
643
+ isSealed(o: any): boolean;
644
+
645
+ /**
646
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
647
+ * @param o Object to test.
648
+ */
649
+ isFrozen(o: any): boolean;
650
+
651
+ /**
652
+ * Returns a value that indicates whether new properties can be added to an object.
653
+ * @param o Object to test.
654
+ */
655
+ isExtensible(o: any): boolean;
656
+
657
+ /**
658
+ * Returns the names of the enumerable string properties and methods of an object.
659
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
660
+ */
661
+ keys(o: object): string[];
662
+ }
663
+
664
+ /**
665
+ * Provides functionality common to all JavaScript objects.
666
+ */
667
+ declare var Object: ObjectConstructor;
668
+
669
+ /**
670
+ * Creates a new function.
671
+ */
672
+ interface Function {
673
+ /**
674
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
675
+ * @param thisArg The object to be used as the this object.
676
+ * @param argArray A set of arguments to be passed to the function.
677
+ */
678
+ apply(this: Function, thisArg: any, argArray?: any): any;
679
+
680
+ /**
681
+ * Calls a method of an object, substituting another object for the current object.
682
+ * @param thisArg The object to be used as the current object.
683
+ * @param argArray A list of arguments to be passed to the method.
684
+ */
685
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
686
+
687
+ /**
688
+ * For a given function, creates a bound function that has the same body as the original function.
689
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
690
+ * @param thisArg An object to which the this keyword can refer inside the new function.
691
+ * @param argArray A list of arguments to be passed to the new function.
692
+ */
693
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
694
+
695
+ /** Returns a string representation of a function. */
696
+ toString(): string;
697
+
698
+ prototype: any;
699
+ readonly length: number;
700
+
701
+ // Non-standard extensions
702
+ arguments: any;
703
+ caller: Function;
704
+ }
705
+
706
+ /**
707
+ * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
708
+ */
709
+ type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any
710
+ ? U
711
+ : unknown;
712
+
713
+ /**
714
+ * Removes the 'this' parameter from a function type.
715
+ */
716
+ type OmitThisParameter<T> = unknown extends ThisParameterType<T>
717
+ ? T
718
+ : T extends (...args: infer A) => infer R
719
+ ? (...args: A) => R
720
+ : T;
721
+
722
+ interface CallableFunction extends Function {
723
+ /**
724
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
725
+ * @param thisArg The object to be used as the this object.
726
+ */
727
+ apply<T, R>(this: (this: T) => R, thisArg: T): R;
728
+
729
+ /**
730
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
731
+ * @param thisArg The object to be used as the this object.
732
+ * @param args An array of argument values to be passed to the function.
733
+ */
734
+ apply<T, A extends any[], R>(
735
+ this: (this: T, ...args: A) => R,
736
+ thisArg: T,
737
+ args: A,
738
+ ): R;
739
+
740
+ /**
741
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
742
+ * @param thisArg The object to be used as the this object.
743
+ * @param args Argument values to be passed to the function.
744
+ */
745
+ call<T, A extends any[], R>(
746
+ this: (this: T, ...args: A) => R,
747
+ thisArg: T,
748
+ ...args: A
749
+ ): R;
750
+
751
+ /**
752
+ * For a given function, creates a bound function that has the same body as the original function.
753
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
754
+ * @param thisArg The object to be used as the this object.
755
+ */
756
+ bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
757
+
758
+ /**
759
+ * For a given function, creates a bound function that has the same body as the original function.
760
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
761
+ * @param thisArg The object to be used as the this object.
762
+ * @param args Arguments to bind to the parameters of the function.
763
+ */
764
+ bind<T, A extends any[], B extends any[], R>(
765
+ this: (this: T, ...args: [...A, ...B]) => R,
766
+ thisArg: T,
767
+ ...args: A
768
+ ): (...args: B) => R;
769
+ }
770
+
771
+ interface NewableFunction extends Function {
772
+ /**
773
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
774
+ * @param thisArg The object to be used as the this object.
775
+ */
776
+ apply<T>(this: new () => T, thisArg: T): void;
777
+ /**
778
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
779
+ * @param thisArg The object to be used as the this object.
780
+ * @param args An array of argument values to be passed to the function.
781
+ */
782
+ apply<T, A extends any[]>(
783
+ this: new (...args: A) => T,
784
+ thisArg: T,
785
+ args: A,
786
+ ): void;
787
+
788
+ /**
789
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
790
+ * @param thisArg The object to be used as the this object.
791
+ * @param args Argument values to be passed to the function.
792
+ */
793
+ call<T, A extends any[]>(
794
+ this: new (...args: A) => T,
795
+ thisArg: T,
796
+ ...args: A
797
+ ): void;
798
+
799
+ /**
800
+ * For a given function, creates a bound function that has the same body as the original function.
801
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
802
+ * @param thisArg The object to be used as the this object.
803
+ */
804
+ bind<T>(this: T, thisArg: any): T;
805
+
806
+ /**
807
+ * For a given function, creates a bound function that has the same body as the original function.
808
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
809
+ * @param thisArg The object to be used as the this object.
810
+ * @param args Arguments to bind to the parameters of the function.
811
+ */
812
+ bind<A extends any[], B extends any[], R>(
813
+ this: new (...args: [...A, ...B]) => R,
814
+ thisArg: any,
815
+ ...args: A
816
+ ): new (...args: B) => R;
817
+ }
818
+
819
+ interface IArguments {
820
+ [index: number]: any;
821
+ length: number;
822
+ callee: Function;
823
+ }
824
+
825
+ interface String {
826
+ /** Returns a string representation of a string. */
827
+ toString(): string;
828
+
829
+ /**
830
+ * Returns the character at the specified index.
831
+ * @param pos The zero-based index of the desired character.
832
+ */
833
+ charAt(pos: number): string;
834
+
835
+ /**
836
+ * Returns the Unicode value of the character at the specified location.
837
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
838
+ */
839
+ charCodeAt(index: number): number;
840
+
841
+ /**
842
+ * Returns a string that contains the concatenation of two or more strings.
843
+ * @param strings The strings to append to the end of the string.
844
+ */
845
+ concat(...strings: string[]): string;
846
+
847
+ /**
848
+ * Returns the position of the first occurrence of a substring.
849
+ * @param searchString The substring to search for in the string
850
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
851
+ */
852
+ indexOf(searchString: string, position?: number): number;
853
+
854
+ /**
855
+ * Returns the last occurrence of a substring in the string.
856
+ * @param searchString The substring to search for.
857
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
858
+ */
859
+ lastIndexOf(searchString: string, position?: number): number;
860
+
861
+ /**
862
+ * Determines whether two strings are equivalent in the current locale.
863
+ * @param that String to compare to target string
864
+ */
865
+ localeCompare(that: string): number;
866
+
867
+ /**
868
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
869
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
870
+ */
871
+ match(regexp: string | RegExp): RegExpMatchArray | null;
872
+
873
+ /**
874
+ * Replaces text in a string, using a regular expression or search string.
875
+ * @param searchValue A string or regular expression to search for.
876
+ * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced.
877
+ */
878
+ replace(searchValue: string | RegExp, replaceValue: string): string;
879
+
880
+ /**
881
+ * Replaces text in a string, using a regular expression or search string.
882
+ * @param searchValue A string to search for.
883
+ * @param replacer A function that returns the replacement text.
884
+ */
885
+ replace(
886
+ searchValue: string | RegExp,
887
+ replacer: (substring: string, ...args: any[]) => string,
888
+ ): string;
889
+
890
+ /**
891
+ * Finds the first substring match in a regular expression search.
892
+ * @param regexp The regular expression pattern and applicable flags.
893
+ */
894
+ search(regexp: string | RegExp): number;
895
+
896
+ /**
897
+ * Returns a section of a string.
898
+ * @param start The index to the beginning of the specified portion of stringObj.
899
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
900
+ * If this value is not specified, the substring continues to the end of stringObj.
901
+ */
902
+ slice(start?: number, end?: number): string;
903
+
904
+ /**
905
+ * Split a string into substrings using the specified separator and return them as an array.
906
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
907
+ * @param limit A value used to limit the number of elements returned in the array.
908
+ */
909
+ split(separator: string | RegExp, limit?: number): string[];
910
+
911
+ /**
912
+ * Returns the substring at the specified location within a String object.
913
+ * @param start The zero-based index number indicating the beginning of the substring.
914
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
915
+ * If end is omitted, the characters from start through the end of the original string are returned.
916
+ */
917
+ substring(start: number, end?: number): string;
918
+
919
+ /** Converts all the alphabetic characters in a string to lowercase. */
920
+ toLowerCase(): string;
921
+
922
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
923
+ toLocaleLowerCase(locales?: string | string[]): string;
924
+
925
+ /** Converts all the alphabetic characters in a string to uppercase. */
926
+ toUpperCase(): string;
927
+
928
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
929
+ toLocaleUpperCase(locales?: string | string[]): string;
930
+
931
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
932
+ trim(): string;
933
+
934
+ /** Returns the length of a String object. */
935
+ readonly length: number;
936
+
937
+ // IE extensions
938
+ /**
939
+ * Gets a substring beginning at the specified location and having the specified length.
940
+ * @deprecated A legacy feature for browser compatibility
941
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
942
+ * @param length The number of characters to include in the returned substring.
943
+ */
944
+ substr(from: number, length?: number): string;
945
+
946
+ /** Returns the primitive value of the specified object. */
947
+ valueOf(): string;
948
+
949
+ readonly [index: number]: string;
950
+ }
951
+
952
+ interface StringConstructor {
953
+ new (value?: any): String;
954
+ (value?: any): string;
955
+ readonly prototype: String;
956
+ fromCharCode(...codes: number[]): string;
957
+ }
958
+
959
+ /**
960
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
961
+ */
962
+ declare var String: StringConstructor;
963
+
964
+ interface Boolean {
965
+ /** Returns the primitive value of the specified object. */
966
+ valueOf(): boolean;
967
+ }
968
+
969
+ interface BooleanConstructor {
970
+ new (value?: any): Boolean;
971
+ <T>(value?: T): boolean;
972
+ readonly prototype: Boolean;
973
+ }
974
+
975
+ declare var Boolean: BooleanConstructor;
976
+
977
+ interface Number {
978
+ /**
979
+ * Returns a string representation of an object.
980
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
981
+ */
982
+ toString(radix?: number): string;
983
+
984
+ /**
985
+ * Returns a string representing a number in fixed-point notation.
986
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
987
+ */
988
+ toFixed(fractionDigits?: number): string;
989
+
990
+ /**
991
+ * Returns a string containing a number represented in exponential notation.
992
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
993
+ */
994
+ toExponential(fractionDigits?: number): string;
995
+
996
+ /**
997
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
998
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
999
+ */
1000
+ toPrecision(precision?: number): string;
1001
+
1002
+ /** Returns the primitive value of the specified object. */
1003
+ valueOf(): number;
1004
+ }
1005
+
1006
+ interface NumberConstructor {
1007
+ new (value?: any): Number;
1008
+ (value?: any): number;
1009
+ readonly prototype: Number;
1010
+
1011
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
1012
+ readonly MAX_VALUE: number;
1013
+
1014
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
1015
+ readonly MIN_VALUE: number;
1016
+
1017
+ /**
1018
+ * A value that is not a number.
1019
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
1020
+ */
1021
+ readonly NaN: number;
1022
+
1023
+ /**
1024
+ * A value that is less than the largest negative number that can be represented in JavaScript.
1025
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
1026
+ */
1027
+ readonly NEGATIVE_INFINITY: number;
1028
+
1029
+ /**
1030
+ * A value greater than the largest number that can be represented in JavaScript.
1031
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
1032
+ */
1033
+ readonly POSITIVE_INFINITY: number;
1034
+ }
1035
+
1036
+ /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
1037
+ declare var Number: NumberConstructor;
1038
+
1039
+ interface TemplateStringsArray extends ReadonlyArray<string> {
1040
+ readonly raw: readonly string[];
1041
+ }
1042
+
1043
+ /**
1044
+ * The type of `import.meta`.
1045
+ *
1046
+ * If you need to declare that a given property exists on `import.meta`,
1047
+ * this type may be augmented via interface merging.
1048
+ */
1049
+ interface ImportMeta {}
1050
+
1051
+ /**
1052
+ * The type for the optional second argument to `import()`.
1053
+ *
1054
+ * If your host environment supports additional options, this type may be
1055
+ * augmented via interface merging.
1056
+ */
1057
+ interface ImportCallOptions {
1058
+ /** @deprecated*/ assert?: ImportAssertions;
1059
+ with?: ImportAttributes;
1060
+ }
1061
+
1062
+ /**
1063
+ * The type for the `assert` property of the optional second argument to `import()`.
1064
+ * @deprecated
1065
+ */
1066
+ interface ImportAssertions {
1067
+ [key: string]: string;
1068
+ }
1069
+
1070
+ /**
1071
+ * The type for the `with` property of the optional second argument to `import()`.
1072
+ */
1073
+ interface ImportAttributes {
1074
+ [key: string]: string;
1075
+ }
1076
+
1077
+ interface Math {
1078
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
1079
+ readonly E: number;
1080
+ /** The natural logarithm of 10. */
1081
+ readonly LN10: number;
1082
+ /** The natural logarithm of 2. */
1083
+ readonly LN2: number;
1084
+ /** The base-2 logarithm of e. */
1085
+ readonly LOG2E: number;
1086
+ /** The base-10 logarithm of e. */
1087
+ readonly LOG10E: number;
1088
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
1089
+ readonly PI: number;
1090
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
1091
+ readonly SQRT1_2: number;
1092
+ /** The square root of 2. */
1093
+ readonly SQRT2: number;
1094
+ /**
1095
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
1096
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
1097
+ * @param x A numeric expression for which the absolute value is needed.
1098
+ */
1099
+ abs(x: number): number;
1100
+ /**
1101
+ * Returns the arc cosine (or inverse cosine) of a number.
1102
+ * @param x A numeric expression.
1103
+ */
1104
+ acos(x: number): number;
1105
+ /**
1106
+ * Returns the arcsine of a number.
1107
+ * @param x A numeric expression.
1108
+ */
1109
+ asin(x: number): number;
1110
+ /**
1111
+ * Returns the arctangent of a number.
1112
+ * @param x A numeric expression for which the arctangent is needed.
1113
+ */
1114
+ atan(x: number): number;
1115
+ /**
1116
+ * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point.
1117
+ * @param y A numeric expression representing the cartesian y-coordinate.
1118
+ * @param x A numeric expression representing the cartesian x-coordinate.
1119
+ */
1120
+ atan2(y: number, x: number): number;
1121
+ /**
1122
+ * Returns the smallest integer greater than or equal to its numeric argument.
1123
+ * @param x A numeric expression.
1124
+ */
1125
+ ceil(x: number): number;
1126
+ /**
1127
+ * Returns the cosine of a number.
1128
+ * @param x A numeric expression that contains an angle measured in radians.
1129
+ */
1130
+ cos(x: number): number;
1131
+ /**
1132
+ * Returns e (the base of natural logarithms) raised to a power.
1133
+ * @param x A numeric expression representing the power of e.
1134
+ */
1135
+ exp(x: number): number;
1136
+ /**
1137
+ * Returns the greatest integer less than or equal to its numeric argument.
1138
+ * @param x A numeric expression.
1139
+ */
1140
+ floor(x: number): number;
1141
+ /**
1142
+ * Returns the natural logarithm (base e) of a number.
1143
+ * @param x A numeric expression.
1144
+ */
1145
+ log(x: number): number;
1146
+ /**
1147
+ * Returns the larger of a set of supplied numeric expressions.
1148
+ * @param values Numeric expressions to be evaluated.
1149
+ */
1150
+ max(...values: number[]): number;
1151
+ /**
1152
+ * Returns the smaller of a set of supplied numeric expressions.
1153
+ * @param values Numeric expressions to be evaluated.
1154
+ */
1155
+ min(...values: number[]): number;
1156
+ /**
1157
+ * Returns the value of a base expression taken to a specified power.
1158
+ * @param x The base value of the expression.
1159
+ * @param y The exponent value of the expression.
1160
+ */
1161
+ pow(x: number, y: number): number;
1162
+ /**
1163
+ * Returns a supplied numeric expression rounded to the nearest integer.
1164
+ * @param x The value to be rounded to the nearest integer.
1165
+ */
1166
+ round(x: number): number;
1167
+ /**
1168
+ * Returns the sine of a number.
1169
+ * @param x A numeric expression that contains an angle measured in radians.
1170
+ */
1171
+ sin(x: number): number;
1172
+ /**
1173
+ * Returns the square root of a number.
1174
+ * @param x A numeric expression.
1175
+ */
1176
+ sqrt(x: number): number;
1177
+ /**
1178
+ * Returns the tangent of a number.
1179
+ * @param x A numeric expression that contains an angle measured in radians.
1180
+ */
1181
+ tan(x: number): number;
1182
+ }
1183
+ /** An intrinsic object that provides basic mathematics functionality and constants. */
1184
+ declare var Math: Math;
1185
+
1186
+ /** Enables basic storage and retrieval of dates and times. */
1187
+ interface Date {
1188
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
1189
+ toString(): string;
1190
+ /** Returns a date as a string value. */
1191
+ toDateString(): string;
1192
+ /** Returns a time as a string value. */
1193
+ toTimeString(): string;
1194
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
1195
+ toLocaleString(): string;
1196
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
1197
+ toLocaleDateString(): string;
1198
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
1199
+ toLocaleTimeString(): string;
1200
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
1201
+ valueOf(): number;
1202
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
1203
+ getTime(): number;
1204
+ /** Gets the year, using local time. */
1205
+ getFullYear(): number;
1206
+ /** Gets the year using Universal Coordinated Time (UTC). */
1207
+ getUTCFullYear(): number;
1208
+ /** Gets the month, using local time. */
1209
+ getMonth(): number;
1210
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
1211
+ getUTCMonth(): number;
1212
+ /** Gets the day-of-the-month, using local time. */
1213
+ getDate(): number;
1214
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
1215
+ getUTCDate(): number;
1216
+ /** Gets the day of the week, using local time. */
1217
+ getDay(): number;
1218
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
1219
+ getUTCDay(): number;
1220
+ /** Gets the hours in a date, using local time. */
1221
+ getHours(): number;
1222
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
1223
+ getUTCHours(): number;
1224
+ /** Gets the minutes of a Date object, using local time. */
1225
+ getMinutes(): number;
1226
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
1227
+ getUTCMinutes(): number;
1228
+ /** Gets the seconds of a Date object, using local time. */
1229
+ getSeconds(): number;
1230
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
1231
+ getUTCSeconds(): number;
1232
+ /** Gets the milliseconds of a Date, using local time. */
1233
+ getMilliseconds(): number;
1234
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
1235
+ getUTCMilliseconds(): number;
1236
+ /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */
1237
+ getTimezoneOffset(): number;
1238
+ /**
1239
+ * Sets the date and time value in the Date object.
1240
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
1241
+ */
1242
+ setTime(time: number): number;
1243
+ /**
1244
+ * Sets the milliseconds value in the Date object using local time.
1245
+ * @param ms A numeric value equal to the millisecond value.
1246
+ */
1247
+ setMilliseconds(ms: number): number;
1248
+ /**
1249
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
1250
+ * @param ms A numeric value equal to the millisecond value.
1251
+ */
1252
+ setUTCMilliseconds(ms: number): number;
1253
+
1254
+ /**
1255
+ * Sets the seconds value in the Date object using local time.
1256
+ * @param sec A numeric value equal to the seconds value.
1257
+ * @param ms A numeric value equal to the milliseconds value.
1258
+ */
1259
+ setSeconds(sec: number, ms?: number): number;
1260
+ /**
1261
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
1262
+ * @param sec A numeric value equal to the seconds value.
1263
+ * @param ms A numeric value equal to the milliseconds value.
1264
+ */
1265
+ setUTCSeconds(sec: number, ms?: number): number;
1266
+ /**
1267
+ * Sets the minutes value in the Date object using local time.
1268
+ * @param min A numeric value equal to the minutes value.
1269
+ * @param sec A numeric value equal to the seconds value.
1270
+ * @param ms A numeric value equal to the milliseconds value.
1271
+ */
1272
+ setMinutes(min: number, sec?: number, ms?: number): number;
1273
+ /**
1274
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
1275
+ * @param min A numeric value equal to the minutes value.
1276
+ * @param sec A numeric value equal to the seconds value.
1277
+ * @param ms A numeric value equal to the milliseconds value.
1278
+ */
1279
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
1280
+ /**
1281
+ * Sets the hour value in the Date object using local time.
1282
+ * @param hours A numeric value equal to the hours value.
1283
+ * @param min A numeric value equal to the minutes value.
1284
+ * @param sec A numeric value equal to the seconds value.
1285
+ * @param ms A numeric value equal to the milliseconds value.
1286
+ */
1287
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
1288
+ /**
1289
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
1290
+ * @param hours A numeric value equal to the hours value.
1291
+ * @param min A numeric value equal to the minutes value.
1292
+ * @param sec A numeric value equal to the seconds value.
1293
+ * @param ms A numeric value equal to the milliseconds value.
1294
+ */
1295
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
1296
+ /**
1297
+ * Sets the numeric day-of-the-month value of the Date object using local time.
1298
+ * @param date A numeric value equal to the day of the month.
1299
+ */
1300
+ setDate(date: number): number;
1301
+ /**
1302
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
1303
+ * @param date A numeric value equal to the day of the month.
1304
+ */
1305
+ setUTCDate(date: number): number;
1306
+ /**
1307
+ * Sets the month value in the Date object using local time.
1308
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
1309
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
1310
+ */
1311
+ setMonth(month: number, date?: number): number;
1312
+ /**
1313
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
1314
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
1315
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
1316
+ */
1317
+ setUTCMonth(month: number, date?: number): number;
1318
+ /**
1319
+ * Sets the year of the Date object using local time.
1320
+ * @param year A numeric value for the year.
1321
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
1322
+ * @param date A numeric value equal for the day of the month.
1323
+ */
1324
+ setFullYear(year: number, month?: number, date?: number): number;
1325
+ /**
1326
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
1327
+ * @param year A numeric value equal to the year.
1328
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
1329
+ * @param date A numeric value equal to the day of the month.
1330
+ */
1331
+ setUTCFullYear(year: number, month?: number, date?: number): number;
1332
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
1333
+ toUTCString(): string;
1334
+ /** Returns a date as a string value in ISO format. */
1335
+ toISOString(): string;
1336
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
1337
+ toJSON(key?: any): string;
1338
+ }
1339
+
1340
+ interface DateConstructor {
1341
+ new (): Date;
1342
+ new (value: number | string): Date;
1343
+ /**
1344
+ * Creates a new Date.
1345
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
1346
+ * @param monthIndex The month as a number between 0 and 11 (January to December).
1347
+ * @param date The date as a number between 1 and 31.
1348
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
1349
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
1350
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
1351
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
1352
+ */
1353
+ new (
1354
+ year: number,
1355
+ monthIndex: number,
1356
+ date?: number,
1357
+ hours?: number,
1358
+ minutes?: number,
1359
+ seconds?: number,
1360
+ ms?: number,
1361
+ ): Date;
1362
+ (): string;
1363
+ readonly prototype: Date;
1364
+ /**
1365
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
1366
+ * @param s A date string
1367
+ */
1368
+ parse(s: string): number;
1369
+ /**
1370
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
1371
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
1372
+ * @param monthIndex The month as a number between 0 and 11 (January to December).
1373
+ * @param date The date as a number between 1 and 31.
1374
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
1375
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
1376
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
1377
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
1378
+ */
1379
+ UTC(
1380
+ year: number,
1381
+ monthIndex: number,
1382
+ date?: number,
1383
+ hours?: number,
1384
+ minutes?: number,
1385
+ seconds?: number,
1386
+ ms?: number,
1387
+ ): number;
1388
+ }
1389
+
1390
+ declare var Date: DateConstructor;
1391
+
1392
+ interface RegExpMatchArray extends Array<string> {
1393
+ /**
1394
+ * The index of the search at which the result was found.
1395
+ */
1396
+ index?: number;
1397
+ /**
1398
+ * A copy of the search string.
1399
+ */
1400
+ input?: string;
1401
+ /**
1402
+ * The first match. This will always be present because `null` will be returned if there are no matches.
1403
+ */
1404
+ 0: string;
1405
+ }
1406
+
1407
+ interface RegExpExecArray extends Array<string> {
1408
+ /**
1409
+ * The index of the search at which the result was found.
1410
+ */
1411
+ index: number;
1412
+ /**
1413
+ * A copy of the search string.
1414
+ */
1415
+ input: string;
1416
+ /**
1417
+ * The first match. This will always be present because `null` will be returned if there are no matches.
1418
+ */
1419
+ 0: string;
1420
+ }
1421
+
1422
+ interface RegExp {
1423
+ /**
1424
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
1425
+ * @param string The String object or string literal on which to perform the search.
1426
+ */
1427
+ exec(string: string): RegExpExecArray | null;
1428
+
1429
+ /**
1430
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
1431
+ * @param string String on which to perform the search.
1432
+ */
1433
+ test(string: string): boolean;
1434
+
1435
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
1436
+ readonly source: string;
1437
+
1438
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
1439
+ readonly global: boolean;
1440
+
1441
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
1442
+ readonly ignoreCase: boolean;
1443
+
1444
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
1445
+ readonly multiline: boolean;
1446
+
1447
+ lastIndex: number;
1448
+
1449
+ // Non-standard extensions
1450
+ /** @deprecated A legacy feature for browser compatibility */
1451
+ compile(pattern: string, flags?: string): this;
1452
+ }
1453
+
1454
+ interface RegExpConstructor {
1455
+ new (pattern: RegExp | string): RegExp;
1456
+ new (pattern: string, flags?: string): RegExp;
1457
+ (pattern: RegExp | string): RegExp;
1458
+ (pattern: string, flags?: string): RegExp;
1459
+ readonly prototype: RegExp;
1460
+
1461
+ // Non-standard extensions
1462
+ /** @deprecated A legacy feature for browser compatibility */
1463
+ $1: string;
1464
+ /** @deprecated A legacy feature for browser compatibility */
1465
+ $2: string;
1466
+ /** @deprecated A legacy feature for browser compatibility */
1467
+ $3: string;
1468
+ /** @deprecated A legacy feature for browser compatibility */
1469
+ $4: string;
1470
+ /** @deprecated A legacy feature for browser compatibility */
1471
+ $5: string;
1472
+ /** @deprecated A legacy feature for browser compatibility */
1473
+ $6: string;
1474
+ /** @deprecated A legacy feature for browser compatibility */
1475
+ $7: string;
1476
+ /** @deprecated A legacy feature for browser compatibility */
1477
+ $8: string;
1478
+ /** @deprecated A legacy feature for browser compatibility */
1479
+ $9: string;
1480
+ /** @deprecated A legacy feature for browser compatibility */
1481
+ input: string;
1482
+ /** @deprecated A legacy feature for browser compatibility */
1483
+ $_: string;
1484
+ /** @deprecated A legacy feature for browser compatibility */
1485
+ lastMatch: string;
1486
+ /** @deprecated A legacy feature for browser compatibility */
1487
+ '$&': string;
1488
+ /** @deprecated A legacy feature for browser compatibility */
1489
+ lastParen: string;
1490
+ /** @deprecated A legacy feature for browser compatibility */
1491
+ '$+': string;
1492
+ /** @deprecated A legacy feature for browser compatibility */
1493
+ leftContext: string;
1494
+ /** @deprecated A legacy feature for browser compatibility */
1495
+ '$`': string;
1496
+ /** @deprecated A legacy feature for browser compatibility */
1497
+ rightContext: string;
1498
+ /** @deprecated A legacy feature for browser compatibility */
1499
+ "$'": string;
1500
+ }
1501
+
1502
+ declare var RegExp: RegExpConstructor;
1503
+
1504
+ interface Error {
1505
+ name: string;
1506
+ message: string;
1507
+ stack?: string;
1508
+ }
1509
+
1510
+ interface ErrorConstructor {
1511
+ new (message?: string): Error;
1512
+ (message?: string): Error;
1513
+ readonly prototype: Error;
1514
+ }
1515
+
1516
+ declare var Error: ErrorConstructor;
1517
+
1518
+ interface EvalError extends Error {}
1519
+
1520
+ interface EvalErrorConstructor extends ErrorConstructor {
1521
+ new (message?: string): EvalError;
1522
+ (message?: string): EvalError;
1523
+ readonly prototype: EvalError;
1524
+ }
1525
+
1526
+ declare var EvalError: EvalErrorConstructor;
1527
+
1528
+ interface RangeError extends Error {}
1529
+
1530
+ interface RangeErrorConstructor extends ErrorConstructor {
1531
+ new (message?: string): RangeError;
1532
+ (message?: string): RangeError;
1533
+ readonly prototype: RangeError;
1534
+ }
1535
+
1536
+ declare var RangeError: RangeErrorConstructor;
1537
+
1538
+ interface ReferenceError extends Error {}
1539
+
1540
+ interface ReferenceErrorConstructor extends ErrorConstructor {
1541
+ new (message?: string): ReferenceError;
1542
+ (message?: string): ReferenceError;
1543
+ readonly prototype: ReferenceError;
1544
+ }
1545
+
1546
+ declare var ReferenceError: ReferenceErrorConstructor;
1547
+
1548
+ interface SyntaxError extends Error {}
1549
+
1550
+ interface SyntaxErrorConstructor extends ErrorConstructor {
1551
+ new (message?: string): SyntaxError;
1552
+ (message?: string): SyntaxError;
1553
+ readonly prototype: SyntaxError;
1554
+ }
1555
+
1556
+ declare var SyntaxError: SyntaxErrorConstructor;
1557
+
1558
+ interface TypeError extends Error {}
1559
+
1560
+ interface TypeErrorConstructor extends ErrorConstructor {
1561
+ new (message?: string): TypeError;
1562
+ (message?: string): TypeError;
1563
+ readonly prototype: TypeError;
1564
+ }
1565
+
1566
+ declare var TypeError: TypeErrorConstructor;
1567
+
1568
+ interface URIError extends Error {}
1569
+
1570
+ interface URIErrorConstructor extends ErrorConstructor {
1571
+ new (message?: string): URIError;
1572
+ (message?: string): URIError;
1573
+ readonly prototype: URIError;
1574
+ }
1575
+
1576
+ declare var URIError: URIErrorConstructor;
1577
+
1578
+ interface JSON {
1579
+ /**
1580
+ * Converts a JavaScript Object Notation (JSON) string into an object.
1581
+ * @param text A valid JSON string.
1582
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
1583
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
1584
+ * @throws {SyntaxError} If `text` is not valid JSON.
1585
+ */
1586
+ parse(
1587
+ text: string,
1588
+ reviver?: (this: any, key: string, value: any) => any,
1589
+ ): any;
1590
+ /**
1591
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1592
+ * @param value A JavaScript value, usually an object or array, to be converted.
1593
+ * @param replacer A function that transforms the results.
1594
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1595
+ * @throws {TypeError} If a circular reference or a BigInt value is found.
1596
+ */
1597
+ stringify(
1598
+ value: any,
1599
+ replacer?: (this: any, key: string, value: any) => any,
1600
+ space?: string | number,
1601
+ ): string;
1602
+ /**
1603
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1604
+ * @param value A JavaScript value, usually an object or array, to be converted.
1605
+ * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
1606
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1607
+ * @throws {TypeError} If a circular reference or a BigInt value is found.
1608
+ */
1609
+ stringify(
1610
+ value: any,
1611
+ replacer?: (number | string)[] | null,
1612
+ space?: string | number,
1613
+ ): string;
1614
+ }
1615
+
1616
+ /**
1617
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1618
+ */
1619
+ declare var JSON: JSON;
1620
+
1621
+ /////////////////////////////
1622
+ /// ECMAScript Array API (specially handled by compiler)
1623
+ /////////////////////////////
1624
+
1625
+ interface ReadonlyArray<T> {
1626
+ /**
1627
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
1628
+ */
1629
+ readonly length: number;
1630
+ /**
1631
+ * Returns a string representation of an array.
1632
+ */
1633
+ toString(): string;
1634
+ /**
1635
+ * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
1636
+ */
1637
+ toLocaleString(): string;
1638
+ /**
1639
+ * Combines two or more arrays.
1640
+ * @param items Additional items to add to the end of array1.
1641
+ */
1642
+ concat(...items: ConcatArray<T>[]): T[];
1643
+ /**
1644
+ * Combines two or more arrays.
1645
+ * @param items Additional items to add to the end of array1.
1646
+ */
1647
+ concat(...items: (T | ConcatArray<T>)[]): T[];
1648
+ /**
1649
+ * Adds all the elements of an array separated by the specified separator string.
1650
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
1651
+ */
1652
+ join(separator?: string): string;
1653
+ /**
1654
+ * Returns a section of an array.
1655
+ * @param start The beginning of the specified portion of the array.
1656
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
1657
+ */
1658
+ slice(start?: number, end?: number): T[];
1659
+ /**
1660
+ * Returns the index of the first occurrence of a value in an array.
1661
+ * @param searchElement The value to locate in the array.
1662
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1663
+ */
1664
+ indexOf(searchElement: T, fromIndex?: number): number;
1665
+ /**
1666
+ * Returns the index of the last occurrence of a specified value in an array.
1667
+ * @param searchElement The value to locate in the array.
1668
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
1669
+ */
1670
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
1671
+ /**
1672
+ * Determines whether all the members of an array satisfy the specified test.
1673
+ * @param predicate A function that accepts up to three arguments. The every method calls
1674
+ * the predicate function for each element in the array until the predicate returns a value
1675
+ * which is coercible to the Boolean value false, or until the end of the array.
1676
+ * @param thisArg An object to which the this keyword can refer in the predicate function.
1677
+ * If thisArg is omitted, undefined is used as the this value.
1678
+ */
1679
+ every<S extends T>(
1680
+ predicate: (value: T, index: number, array: readonly T[]) => value is S,
1681
+ thisArg?: any,
1682
+ ): this is readonly S[];
1683
+ /**
1684
+ * Determines whether all the members of an array satisfy the specified test.
1685
+ * @param predicate A function that accepts up to three arguments. The every method calls
1686
+ * the predicate function for each element in the array until the predicate returns a value
1687
+ * which is coercible to the Boolean value false, or until the end of the array.
1688
+ * @param thisArg An object to which the this keyword can refer in the predicate function.
1689
+ * If thisArg is omitted, undefined is used as the this value.
1690
+ */
1691
+ every(
1692
+ predicate: (value: T, index: number, array: readonly T[]) => unknown,
1693
+ thisArg?: any,
1694
+ ): boolean;
1695
+ /**
1696
+ * Determines whether the specified callback function returns true for any element of an array.
1697
+ * @param predicate A function that accepts up to three arguments. The some method calls
1698
+ * the predicate function for each element in the array until the predicate returns a value
1699
+ * which is coercible to the Boolean value true, or until the end of the array.
1700
+ * @param thisArg An object to which the this keyword can refer in the predicate function.
1701
+ * If thisArg is omitted, undefined is used as the this value.
1702
+ */
1703
+ some(
1704
+ predicate: (value: T, index: number, array: readonly T[]) => unknown,
1705
+ thisArg?: any,
1706
+ ): boolean;
1707
+ /**
1708
+ * Performs the specified action for each element in an array.
1709
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1710
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1711
+ */
1712
+ forEach(
1713
+ callbackfn: (value: T, index: number, array: readonly T[]) => void,
1714
+ thisArg?: any,
1715
+ ): void;
1716
+ /**
1717
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1718
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1719
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1720
+ */
1721
+ map<U>(
1722
+ callbackfn: (value: T, index: number, array: readonly T[]) => U,
1723
+ thisArg?: any,
1724
+ ): U[];
1725
+ /**
1726
+ * Returns the elements of an array that meet the condition specified in a callback function.
1727
+ * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1728
+ * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1729
+ */
1730
+ filter<S extends T>(
1731
+ predicate: (value: T, index: number, array: readonly T[]) => value is S,
1732
+ thisArg?: any,
1733
+ ): S[];
1734
+ /**
1735
+ * Returns the elements of an array that meet the condition specified in a callback function.
1736
+ * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1737
+ * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1738
+ */
1739
+ filter(
1740
+ predicate: (value: T, index: number, array: readonly T[]) => unknown,
1741
+ thisArg?: any,
1742
+ ): T[];
1743
+ /**
1744
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1745
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1746
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1747
+ */
1748
+ reduce(
1749
+ callbackfn: (
1750
+ previousValue: T,
1751
+ currentValue: T,
1752
+ currentIndex: number,
1753
+ array: readonly T[],
1754
+ ) => T,
1755
+ ): T;
1756
+ reduce(
1757
+ callbackfn: (
1758
+ previousValue: T,
1759
+ currentValue: T,
1760
+ currentIndex: number,
1761
+ array: readonly T[],
1762
+ ) => T,
1763
+ initialValue: T,
1764
+ ): T;
1765
+ /**
1766
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1767
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1768
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1769
+ */
1770
+ reduce<U>(
1771
+ callbackfn: (
1772
+ previousValue: U,
1773
+ currentValue: T,
1774
+ currentIndex: number,
1775
+ array: readonly T[],
1776
+ ) => U,
1777
+ initialValue: U,
1778
+ ): U;
1779
+ /**
1780
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1781
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1782
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1783
+ */
1784
+ reduceRight(
1785
+ callbackfn: (
1786
+ previousValue: T,
1787
+ currentValue: T,
1788
+ currentIndex: number,
1789
+ array: readonly T[],
1790
+ ) => T,
1791
+ ): T;
1792
+ reduceRight(
1793
+ callbackfn: (
1794
+ previousValue: T,
1795
+ currentValue: T,
1796
+ currentIndex: number,
1797
+ array: readonly T[],
1798
+ ) => T,
1799
+ initialValue: T,
1800
+ ): T;
1801
+ /**
1802
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1803
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1804
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1805
+ */
1806
+ reduceRight<U>(
1807
+ callbackfn: (
1808
+ previousValue: U,
1809
+ currentValue: T,
1810
+ currentIndex: number,
1811
+ array: readonly T[],
1812
+ ) => U,
1813
+ initialValue: U,
1814
+ ): U;
1815
+
1816
+ readonly [n: number]: T;
1817
+ }
1818
+
1819
+ interface ConcatArray<T> {
1820
+ readonly length: number;
1821
+ readonly [n: number]: T;
1822
+ join(separator?: string): string;
1823
+ slice(start?: number, end?: number): T[];
1824
+ }
1825
+
1826
+ interface Array<T> {
1827
+ /**
1828
+ * Gets or sets the length of the array. This is a number one higher than the highest index in the array.
1829
+ */
1830
+ length: number;
1831
+ /**
1832
+ * Returns a string representation of an array.
1833
+ */
1834
+ toString(): string;
1835
+ /**
1836
+ * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
1837
+ */
1838
+ toLocaleString(): string;
1839
+ /**
1840
+ * Removes the last element from an array and returns it.
1841
+ * If the array is empty, undefined is returned and the array is not modified.
1842
+ */
1843
+ pop(): T | undefined;
1844
+ /**
1845
+ * Appends new elements to the end of an array, and returns the new length of the array.
1846
+ * @param items New elements to add to the array.
1847
+ */
1848
+ push(...items: T[]): number;
1849
+ /**
1850
+ * Combines two or more arrays.
1851
+ * This method returns a new array without modifying any existing arrays.
1852
+ * @param items Additional arrays and/or items to add to the end of the array.
1853
+ */
1854
+ concat(...items: ConcatArray<T>[]): T[];
1855
+ /**
1856
+ * Combines two or more arrays.
1857
+ * This method returns a new array without modifying any existing arrays.
1858
+ * @param items Additional arrays and/or items to add to the end of the array.
1859
+ */
1860
+ concat(...items: (T | ConcatArray<T>)[]): T[];
1861
+ /**
1862
+ * Adds all the elements of an array into a string, separated by the specified separator string.
1863
+ * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
1864
+ */
1865
+ join(separator?: string): string;
1866
+ /**
1867
+ * Reverses the elements in an array in place.
1868
+ * This method mutates the array and returns a reference to the same array.
1869
+ */
1870
+ reverse(): T[];
1871
+ /**
1872
+ * Removes the first element from an array and returns it.
1873
+ * If the array is empty, undefined is returned and the array is not modified.
1874
+ */
1875
+ shift(): T | undefined;
1876
+ /**
1877
+ * Returns a copy of a section of an array.
1878
+ * For both start and end, a negative index can be used to indicate an offset from the end of the array.
1879
+ * For example, -2 refers to the second to last element of the array.
1880
+ * @param start The beginning index of the specified portion of the array.
1881
+ * If start is undefined, then the slice begins at index 0.
1882
+ * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.
1883
+ * If end is undefined, then the slice extends to the end of the array.
1884
+ */
1885
+ slice(start?: number, end?: number): T[];
1886
+ /**
1887
+ * Sorts an array in place.
1888
+ * This method mutates the array and returns a reference to the same array.
1889
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
1890
+ * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
1891
+ * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
1892
+ * ```ts
1893
+ * [11,2,22,1].sort((a, b) => a - b)
1894
+ * ```
1895
+ */
1896
+ sort(compareFn?: (a: T, b: T) => number): this;
1897
+ /**
1898
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1899
+ * @param start The zero-based location in the array from which to start removing elements.
1900
+ * @param deleteCount The number of elements to remove. Omitting this argument will remove all elements from the start
1901
+ * paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type
1902
+ * that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
1903
+ * @returns An array containing the elements that were deleted.
1904
+ */
1905
+ splice(start: number, deleteCount?: number): T[];
1906
+ /**
1907
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1908
+ * @param start The zero-based location in the array from which to start removing elements.
1909
+ * @param deleteCount The number of elements to remove. If value of this argument is either a negative number, zero,
1910
+ * undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and
1911
+ * not remove any elements.
1912
+ * @param items Elements to insert into the array in place of the deleted elements.
1913
+ * @returns An array containing the elements that were deleted.
1914
+ */
1915
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
1916
+ /**
1917
+ * Inserts new elements at the start of an array, and returns the new length of the array.
1918
+ * @param items Elements to insert at the start of the array.
1919
+ */
1920
+ unshift(...items: T[]): number;
1921
+ /**
1922
+ * Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
1923
+ * @param searchElement The value to locate in the array.
1924
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1925
+ */
1926
+ indexOf(searchElement: T, fromIndex?: number): number;
1927
+ /**
1928
+ * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
1929
+ * @param searchElement The value to locate in the array.
1930
+ * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
1931
+ */
1932
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
1933
+ /**
1934
+ * Determines whether all the members of an array satisfy the specified test.
1935
+ * @param predicate A function that accepts up to three arguments. The every method calls
1936
+ * the predicate function for each element in the array until the predicate returns a value
1937
+ * which is coercible to the Boolean value false, or until the end of the array.
1938
+ * @param thisArg An object to which the this keyword can refer in the predicate function.
1939
+ * If thisArg is omitted, undefined is used as the this value.
1940
+ */
1941
+ every<S extends T>(
1942
+ predicate: (value: T, index: number, array: T[]) => value is S,
1943
+ thisArg?: any,
1944
+ ): this is S[];
1945
+ /**
1946
+ * Determines whether all the members of an array satisfy the specified test.
1947
+ * @param predicate A function that accepts up to three arguments. The every method calls
1948
+ * the predicate function for each element in the array until the predicate returns a value
1949
+ * which is coercible to the Boolean value false, or until the end of the array.
1950
+ * @param thisArg An object to which the this keyword can refer in the predicate function.
1951
+ * If thisArg is omitted, undefined is used as the this value.
1952
+ */
1953
+ every(
1954
+ predicate: (value: T, index: number, array: T[]) => unknown,
1955
+ thisArg?: any,
1956
+ ): boolean;
1957
+ /**
1958
+ * Determines whether the specified callback function returns true for any element of an array.
1959
+ * @param predicate A function that accepts up to three arguments. The some method calls
1960
+ * the predicate function for each element in the array until the predicate returns a value
1961
+ * which is coercible to the Boolean value true, or until the end of the array.
1962
+ * @param thisArg An object to which the this keyword can refer in the predicate function.
1963
+ * If thisArg is omitted, undefined is used as the this value.
1964
+ */
1965
+ some(
1966
+ predicate: (value: T, index: number, array: T[]) => unknown,
1967
+ thisArg?: any,
1968
+ ): boolean;
1969
+ /**
1970
+ * Performs the specified action for each element in an array.
1971
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1972
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1973
+ */
1974
+ forEach(
1975
+ callbackfn: (value: T, index: number, array: T[]) => void,
1976
+ thisArg?: any,
1977
+ ): void;
1978
+ /**
1979
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1980
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1981
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1982
+ */
1983
+ map<U>(
1984
+ callbackfn: (value: T, index: number, array: T[]) => U,
1985
+ thisArg?: any,
1986
+ ): U[];
1987
+ /**
1988
+ * Returns the elements of an array that meet the condition specified in a callback function.
1989
+ * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1990
+ * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1991
+ */
1992
+ filter<S extends T>(
1993
+ predicate: (value: T, index: number, array: T[]) => value is S,
1994
+ thisArg?: any,
1995
+ ): S[];
1996
+ /**
1997
+ * Returns the elements of an array that meet the condition specified in a callback function.
1998
+ * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1999
+ * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
2000
+ */
2001
+ filter(
2002
+ predicate: (value: T, index: number, array: T[]) => unknown,
2003
+ thisArg?: any,
2004
+ ): T[];
2005
+ /**
2006
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
2007
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
2008
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
2009
+ */
2010
+ reduce(
2011
+ callbackfn: (
2012
+ previousValue: T,
2013
+ currentValue: T,
2014
+ currentIndex: number,
2015
+ array: T[],
2016
+ ) => T,
2017
+ ): T;
2018
+ reduce(
2019
+ callbackfn: (
2020
+ previousValue: T,
2021
+ currentValue: T,
2022
+ currentIndex: number,
2023
+ array: T[],
2024
+ ) => T,
2025
+ initialValue: T,
2026
+ ): T;
2027
+ /**
2028
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
2029
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
2030
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
2031
+ */
2032
+ reduce<U>(
2033
+ callbackfn: (
2034
+ previousValue: U,
2035
+ currentValue: T,
2036
+ currentIndex: number,
2037
+ array: T[],
2038
+ ) => U,
2039
+ initialValue: U,
2040
+ ): U;
2041
+ /**
2042
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
2043
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
2044
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
2045
+ */
2046
+ reduceRight(
2047
+ callbackfn: (
2048
+ previousValue: T,
2049
+ currentValue: T,
2050
+ currentIndex: number,
2051
+ array: T[],
2052
+ ) => T,
2053
+ ): T;
2054
+ reduceRight(
2055
+ callbackfn: (
2056
+ previousValue: T,
2057
+ currentValue: T,
2058
+ currentIndex: number,
2059
+ array: T[],
2060
+ ) => T,
2061
+ initialValue: T,
2062
+ ): T;
2063
+ /**
2064
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
2065
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
2066
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
2067
+ */
2068
+ reduceRight<U>(
2069
+ callbackfn: (
2070
+ previousValue: U,
2071
+ currentValue: T,
2072
+ currentIndex: number,
2073
+ array: T[],
2074
+ ) => U,
2075
+ initialValue: U,
2076
+ ): U;
2077
+
2078
+ [n: number]: T;
2079
+ }
2080
+
2081
+ interface ArrayConstructor {
2082
+ new (arrayLength?: number): any[];
2083
+ new <T>(arrayLength: number): T[];
2084
+ new <T>(...items: T[]): T[];
2085
+ (arrayLength?: number): any[];
2086
+ <T>(arrayLength: number): T[];
2087
+ <T>(...items: T[]): T[];
2088
+ isArray(arg: any): arg is any[];
2089
+ readonly prototype: any[];
2090
+ }
2091
+
2092
+ declare var Array: ArrayConstructor;
2093
+
2094
+ interface ArrayLike<T> {
2095
+ readonly length: number;
2096
+ readonly [n: number]: T;
2097
+ }
2098
+
2099
+ /**
2100
+ * Make all properties in T optional
2101
+ */
2102
+ type Partial<T> = {
2103
+ [P in keyof T]?: T[P];
2104
+ };
2105
+
2106
+ /**
2107
+ * Make all properties in T required
2108
+ */
2109
+ type Required<T> = {
2110
+ [P in keyof T]-?: T[P];
2111
+ };
2112
+
2113
+ /**
2114
+ * Make all properties in T readonly
2115
+ */
2116
+ type Readonly<T> = {
2117
+ readonly [P in keyof T]: T[P];
2118
+ };
2119
+
2120
+ /**
2121
+ * From T, pick a set of properties whose keys are in the union K
2122
+ */
2123
+ type Pick<T, K extends keyof T> = {
2124
+ [P in K]: T[P];
2125
+ };
2126
+
2127
+ /**
2128
+ * Construct a type with a set of properties K of type T
2129
+ */
2130
+ type Record<K extends keyof any, T> = {
2131
+ [P in K]: T;
2132
+ };
2133
+
2134
+ /**
2135
+ * Exclude from T those types that are assignable to U
2136
+ */
2137
+ type Exclude<T, U> = T extends U ? never : T;
2138
+
2139
+ /**
2140
+ * Extract from T those types that are assignable to U
2141
+ */
2142
+ type Extract<T, U> = T extends U ? T : never;
2143
+
2144
+ /**
2145
+ * Construct a type with the properties of T except for those in type K.
2146
+ */
2147
+ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
2148
+
2149
+ /**
2150
+ * Exclude null and undefined from T
2151
+ */
2152
+ type NonNullable<T> = T & {};
2153
+
2154
+ /**
2155
+ * Obtain the parameters of a function type in a tuple
2156
+ */
2157
+ type Parameters<T extends (...args: any) => any> = T extends (
2158
+ ...args: infer P
2159
+ ) => any
2160
+ ? P
2161
+ : never;
2162
+
2163
+ /**
2164
+ * Obtain the parameters of a constructor function type in a tuple
2165
+ */
2166
+ type ConstructorParameters<T extends abstract new (...args: any) => any> =
2167
+ T extends abstract new (...args: infer P) => any ? P : never;
2168
+
2169
+ /**
2170
+ * Obtain the return type of a function type
2171
+ */
2172
+ type ReturnType<T extends (...args: any) => any> = T extends (
2173
+ ...args: any
2174
+ ) => infer R
2175
+ ? R
2176
+ : any;
2177
+
2178
+ /**
2179
+ * Obtain the return type of a constructor function type
2180
+ */
2181
+ type InstanceType<T extends abstract new (...args: any) => any> =
2182
+ T extends abstract new (...args: any) => infer R ? R : any;
2183
+
2184
+ /**
2185
+ * Convert string literal type to uppercase
2186
+ */
2187
+ type Uppercase<S extends string> = intrinsic;
2188
+
2189
+ /**
2190
+ * Convert string literal type to lowercase
2191
+ */
2192
+ type Lowercase<S extends string> = intrinsic;
2193
+
2194
+ /**
2195
+ * Convert first character of string literal type to uppercase
2196
+ */
2197
+ type Capitalize<S extends string> = intrinsic;
2198
+
2199
+ /**
2200
+ * Convert first character of string literal type to lowercase
2201
+ */
2202
+ type Uncapitalize<S extends string> = intrinsic;
2203
+
2204
+ /**
2205
+ * Marker for non-inference type position
2206
+ */
2207
+ type NoInfer<T> = intrinsic;
2208
+
2209
+ /**
2210
+ * Marker for contextual 'this' type
2211
+ */
2212
+ interface ThisType<T> {}
2213
+
2214
+ /**
2215
+ * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry
2216
+ */
2217
+ interface WeakKeyTypes {
2218
+ object: object;
2219
+ }
2220
+
2221
+ type WeakKey = WeakKeyTypes[keyof WeakKeyTypes];
2222
+
2223
+ /**
2224
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
2225
+ */
2226
+ interface ArrayBufferTypes {
2227
+ ArrayBuffer: ArrayBuffer;
2228
+ }
2229
+
2230
+ /////////////////////////////
2231
+ /// ECMAScript Internationalization API
2232
+ /////////////////////////////
2233
+
2234
+ interface String {
2235
+ /**
2236
+ * Determines whether two strings are equivalent in the current or specified locale.
2237
+ * @param that String to compare to target string
2238
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
2239
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
2240
+ */
2241
+ localeCompare(
2242
+ that: string,
2243
+ locales?: string | string[],
2244
+ options?: Intl.CollatorOptions,
2245
+ ): number;
2246
+ }
2247
+
2248
+ interface Number {
2249
+ /**
2250
+ * Converts a number to a string by using the current or specified locale.
2251
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
2252
+ * @param options An object that contains one or more properties that specify comparison options.
2253
+ */
2254
+ toLocaleString(
2255
+ locales?: string | string[],
2256
+ options?: Intl.NumberFormatOptions,
2257
+ ): string;
2258
+ }
2259
+
2260
+ interface Date {
2261
+ /**
2262
+ * Converts a date and time to a string by using the current or specified locale.
2263
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
2264
+ * @param options An object that contains one or more properties that specify comparison options.
2265
+ */
2266
+ toLocaleString(
2267
+ locales?: string | string[],
2268
+ options?: Intl.DateTimeFormatOptions,
2269
+ ): string;
2270
+ /**
2271
+ * Converts a date to a string by using the current or specified locale.
2272
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
2273
+ * @param options An object that contains one or more properties that specify comparison options.
2274
+ */
2275
+ toLocaleDateString(
2276
+ locales?: string | string[],
2277
+ options?: Intl.DateTimeFormatOptions,
2278
+ ): string;
2279
+
2280
+ /**
2281
+ * Converts a time to a string by using the current or specified locale.
2282
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
2283
+ * @param options An object that contains one or more properties that specify comparison options.
2284
+ */
2285
+ toLocaleTimeString(
2286
+ locales?: string | string[],
2287
+ options?: Intl.DateTimeFormatOptions,
2288
+ ): string;
2289
+ }
2290
+ // #endregion
2291
+
2292
+ // #region es2015.core TypeScript lib content
2293
+ interface Array<T> {
2294
+ /**
2295
+ * Returns the value of the first element in the array where predicate is true, and undefined
2296
+ * otherwise.
2297
+ * @param predicate find calls predicate once for each element of the array, in ascending
2298
+ * order, until it finds one where predicate returns true. If such an element is found, find
2299
+ * immediately returns that element value. Otherwise, find returns undefined.
2300
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2301
+ * predicate. If it is not provided, undefined is used instead.
2302
+ */
2303
+ find<S extends T>(
2304
+ predicate: (value: T, index: number, obj: T[]) => value is S,
2305
+ thisArg?: any,
2306
+ ): S | undefined;
2307
+ find(
2308
+ predicate: (value: T, index: number, obj: T[]) => unknown,
2309
+ thisArg?: any,
2310
+ ): T | undefined;
2311
+
2312
+ /**
2313
+ * Returns the index of the first element in the array where predicate is true, and -1
2314
+ * otherwise.
2315
+ * @param predicate find calls predicate once for each element of the array, in ascending
2316
+ * order, until it finds one where predicate returns true. If such an element is found,
2317
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2318
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2319
+ * predicate. If it is not provided, undefined is used instead.
2320
+ */
2321
+ findIndex(
2322
+ predicate: (value: T, index: number, obj: T[]) => unknown,
2323
+ thisArg?: any,
2324
+ ): number;
2325
+
2326
+ /**
2327
+ * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
2328
+ * @param value value to fill array section with
2329
+ * @param start index to start filling the array at. If start is negative, it is treated as
2330
+ * length+start where length is the length of the array.
2331
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2332
+ * length+end.
2333
+ */
2334
+ fill(value: T, start?: number, end?: number): this;
2335
+
2336
+ /**
2337
+ * Returns the this object after copying a section of the array identified by start and end
2338
+ * to the same array starting at position target
2339
+ * @param target If target is negative, it is treated as length+target where length is the
2340
+ * length of the array.
2341
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2342
+ * is treated as length+end.
2343
+ * @param end If not specified, length of the this object is used as its default value.
2344
+ */
2345
+ copyWithin(target: number, start: number, end?: number): this;
2346
+
2347
+ toLocaleString(
2348
+ locales: string | string[],
2349
+ options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions,
2350
+ ): string;
2351
+ }
2352
+
2353
+ interface ArrayConstructor {
2354
+ /**
2355
+ * Creates an array from an array-like object.
2356
+ * @param arrayLike An array-like object to convert to an array.
2357
+ */
2358
+ from<T>(arrayLike: ArrayLike<T>): T[];
2359
+
2360
+ /**
2361
+ * Creates an array from an iterable object.
2362
+ * @param arrayLike An array-like object to convert to an array.
2363
+ * @param mapfn A mapping function to call on every element of the array.
2364
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2365
+ */
2366
+ from<T, U>(
2367
+ arrayLike: ArrayLike<T>,
2368
+ mapfn: (v: T, k: number) => U,
2369
+ thisArg?: any,
2370
+ ): U[];
2371
+
2372
+ /**
2373
+ * Returns a new array from a set of elements.
2374
+ * @param items A set of elements to include in the new array object.
2375
+ */
2376
+ of<T>(...items: T[]): T[];
2377
+ }
2378
+
2379
+ interface DateConstructor {
2380
+ new (value: number | string | Date): Date;
2381
+ }
2382
+
2383
+ interface Function {
2384
+ /**
2385
+ * Returns the name of the function. Function names are read-only and can not be changed.
2386
+ */
2387
+ readonly name: string;
2388
+ }
2389
+
2390
+ interface Math {
2391
+ /**
2392
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
2393
+ * @param x A numeric expression.
2394
+ */
2395
+ clz32(x: number): number;
2396
+
2397
+ /**
2398
+ * Returns the result of 32-bit multiplication of two numbers.
2399
+ * @param x First number
2400
+ * @param y Second number
2401
+ */
2402
+ imul(x: number, y: number): number;
2403
+
2404
+ /**
2405
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
2406
+ * @param x The numeric expression to test
2407
+ */
2408
+ sign(x: number): number;
2409
+
2410
+ /**
2411
+ * Returns the base 10 logarithm of a number.
2412
+ * @param x A numeric expression.
2413
+ */
2414
+ log10(x: number): number;
2415
+
2416
+ /**
2417
+ * Returns the base 2 logarithm of a number.
2418
+ * @param x A numeric expression.
2419
+ */
2420
+ log2(x: number): number;
2421
+
2422
+ /**
2423
+ * Returns the natural logarithm of 1 + x.
2424
+ * @param x A numeric expression.
2425
+ */
2426
+ log1p(x: number): number;
2427
+
2428
+ /**
2429
+ * Returns the result of (e^x - 1), which is an implementation-dependent approximation to
2430
+ * subtracting 1 from the exponential function of x (e raised to the power of x, where e
2431
+ * is the base of the natural logarithms).
2432
+ * @param x A numeric expression.
2433
+ */
2434
+ expm1(x: number): number;
2435
+
2436
+ /**
2437
+ * Returns the hyperbolic cosine of a number.
2438
+ * @param x A numeric expression that contains an angle measured in radians.
2439
+ */
2440
+ cosh(x: number): number;
2441
+
2442
+ /**
2443
+ * Returns the hyperbolic sine of a number.
2444
+ * @param x A numeric expression that contains an angle measured in radians.
2445
+ */
2446
+ sinh(x: number): number;
2447
+
2448
+ /**
2449
+ * Returns the hyperbolic tangent of a number.
2450
+ * @param x A numeric expression that contains an angle measured in radians.
2451
+ */
2452
+ tanh(x: number): number;
2453
+
2454
+ /**
2455
+ * Returns the inverse hyperbolic cosine of a number.
2456
+ * @param x A numeric expression that contains an angle measured in radians.
2457
+ */
2458
+ acosh(x: number): number;
2459
+
2460
+ /**
2461
+ * Returns the inverse hyperbolic sine of a number.
2462
+ * @param x A numeric expression that contains an angle measured in radians.
2463
+ */
2464
+ asinh(x: number): number;
2465
+
2466
+ /**
2467
+ * Returns the inverse hyperbolic tangent of a number.
2468
+ * @param x A numeric expression that contains an angle measured in radians.
2469
+ */
2470
+ atanh(x: number): number;
2471
+
2472
+ /**
2473
+ * Returns the square root of the sum of squares of its arguments.
2474
+ * @param values Values to compute the square root for.
2475
+ * If no arguments are passed, the result is +0.
2476
+ * If there is only one argument, the result is the absolute value.
2477
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
2478
+ * If any argument is NaN, the result is NaN.
2479
+ * If all arguments are either +0 or −0, the result is +0.
2480
+ */
2481
+ hypot(...values: number[]): number;
2482
+
2483
+ /**
2484
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
2485
+ * If x is already an integer, the result is x.
2486
+ * @param x A numeric expression.
2487
+ */
2488
+ trunc(x: number): number;
2489
+
2490
+ /**
2491
+ * Returns the nearest single precision float representation of a number.
2492
+ * @param x A numeric expression.
2493
+ */
2494
+ fround(x: number): number;
2495
+
2496
+ /**
2497
+ * Returns an implementation-dependent approximation to the cube root of number.
2498
+ * @param x A numeric expression.
2499
+ */
2500
+ cbrt(x: number): number;
2501
+ }
2502
+
2503
+ interface NumberConstructor {
2504
+ /**
2505
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
2506
+ * that is representable as a Number value, which is approximately:
2507
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
2508
+ */
2509
+ readonly EPSILON: number;
2510
+
2511
+ /**
2512
+ * Returns true if passed value is finite.
2513
+ * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
2514
+ * number. Only finite values of the type number, result in true.
2515
+ * @param number A numeric value.
2516
+ */
2517
+ isFinite(number: unknown): boolean;
2518
+
2519
+ /**
2520
+ * Returns true if the value passed is an integer, false otherwise.
2521
+ * @param number A numeric value.
2522
+ */
2523
+ isInteger(number: unknown): boolean;
2524
+
2525
+ /**
2526
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
2527
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
2528
+ * to a number. Only values of the type number, that are also NaN, result in true.
2529
+ * @param number A numeric value.
2530
+ */
2531
+ isNaN(number: unknown): boolean;
2532
+
2533
+ /**
2534
+ * Returns true if the value passed is a safe integer.
2535
+ * @param number A numeric value.
2536
+ */
2537
+ isSafeInteger(number: unknown): boolean;
2538
+
2539
+ /**
2540
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
2541
+ * a Number value.
2542
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
2543
+ */
2544
+ readonly MAX_SAFE_INTEGER: number;
2545
+
2546
+ /**
2547
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
2548
+ * a Number value.
2549
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
2550
+ */
2551
+ readonly MIN_SAFE_INTEGER: number;
2552
+
2553
+ /**
2554
+ * Converts a string to a floating-point number.
2555
+ * @param string A string that contains a floating-point number.
2556
+ */
2557
+ parseFloat(string: string): number;
2558
+
2559
+ /**
2560
+ * Converts A string to an integer.
2561
+ * @param string A string to convert into a number.
2562
+ * @param radix A value between 2 and 36 that specifies the base of the number in `string`.
2563
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
2564
+ * All other strings are considered decimal.
2565
+ */
2566
+ parseInt(string: string, radix?: number): number;
2567
+ }
2568
+
2569
+ interface ObjectConstructor {
2570
+ /**
2571
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
2572
+ * target object. Returns the target object.
2573
+ * @param target The target object to copy to.
2574
+ * @param source The source object from which to copy properties.
2575
+ */
2576
+ assign<T extends {}, U>(target: T, source: U): T & U;
2577
+
2578
+ /**
2579
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
2580
+ * target object. Returns the target object.
2581
+ * @param target The target object to copy to.
2582
+ * @param source1 The first source object from which to copy properties.
2583
+ * @param source2 The second source object from which to copy properties.
2584
+ */
2585
+ assign<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
2586
+
2587
+ /**
2588
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
2589
+ * target object. Returns the target object.
2590
+ * @param target The target object to copy to.
2591
+ * @param source1 The first source object from which to copy properties.
2592
+ * @param source2 The second source object from which to copy properties.
2593
+ * @param source3 The third source object from which to copy properties.
2594
+ */
2595
+ assign<T extends {}, U, V, W>(
2596
+ target: T,
2597
+ source1: U,
2598
+ source2: V,
2599
+ source3: W,
2600
+ ): T & U & V & W;
2601
+
2602
+ /**
2603
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
2604
+ * target object. Returns the target object.
2605
+ * @param target The target object to copy to.
2606
+ * @param sources One or more source objects from which to copy properties
2607
+ */
2608
+ assign(target: object, ...sources: any[]): any;
2609
+
2610
+ /**
2611
+ * Returns an array of all symbol properties found directly on object o.
2612
+ * @param o Object to retrieve the symbols from.
2613
+ */
2614
+ getOwnPropertySymbols(o: any): symbol[];
2615
+
2616
+ /**
2617
+ * Returns the names of the enumerable string properties and methods of an object.
2618
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2619
+ */
2620
+ keys(o: {}): string[];
2621
+
2622
+ /**
2623
+ * Returns true if the values are the same value, false otherwise.
2624
+ * @param value1 The first value.
2625
+ * @param value2 The second value.
2626
+ */
2627
+ is(value1: any, value2: any): boolean;
2628
+
2629
+ /**
2630
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
2631
+ * @param o The object to change its prototype.
2632
+ * @param proto The value of the new prototype or null.
2633
+ */
2634
+ setPrototypeOf(o: any, proto: object | null): any;
2635
+ }
2636
+
2637
+ interface ReadonlyArray<T> {
2638
+ /**
2639
+ * Returns the value of the first element in the array where predicate is true, and undefined
2640
+ * otherwise.
2641
+ * @param predicate find calls predicate once for each element of the array, in ascending
2642
+ * order, until it finds one where predicate returns true. If such an element is found, find
2643
+ * immediately returns that element value. Otherwise, find returns undefined.
2644
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2645
+ * predicate. If it is not provided, undefined is used instead.
2646
+ */
2647
+ find<S extends T>(
2648
+ predicate: (value: T, index: number, obj: readonly T[]) => value is S,
2649
+ thisArg?: any,
2650
+ ): S | undefined;
2651
+ find(
2652
+ predicate: (value: T, index: number, obj: readonly T[]) => unknown,
2653
+ thisArg?: any,
2654
+ ): T | undefined;
2655
+
2656
+ /**
2657
+ * Returns the index of the first element in the array where predicate is true, and -1
2658
+ * otherwise.
2659
+ * @param predicate find calls predicate once for each element of the array, in ascending
2660
+ * order, until it finds one where predicate returns true. If such an element is found,
2661
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2662
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2663
+ * predicate. If it is not provided, undefined is used instead.
2664
+ */
2665
+ findIndex(
2666
+ predicate: (value: T, index: number, obj: readonly T[]) => unknown,
2667
+ thisArg?: any,
2668
+ ): number;
2669
+
2670
+ toLocaleString(
2671
+ locales: string | string[],
2672
+ options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions,
2673
+ ): string;
2674
+ }
2675
+
2676
+ interface RegExp {
2677
+ /**
2678
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
2679
+ * The characters in this string are sequenced and concatenated in the following order:
2680
+ *
2681
+ * - "g" for global
2682
+ * - "i" for ignoreCase
2683
+ * - "m" for multiline
2684
+ * - "u" for unicode
2685
+ * - "y" for sticky
2686
+ *
2687
+ * If no flags are set, the value is the empty string.
2688
+ */
2689
+ readonly flags: string;
2690
+
2691
+ /**
2692
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
2693
+ * expression. Default is false. Read-only.
2694
+ */
2695
+ readonly sticky: boolean;
2696
+
2697
+ /**
2698
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
2699
+ * expression. Default is false. Read-only.
2700
+ */
2701
+ readonly unicode: boolean;
2702
+ }
2703
+
2704
+ interface RegExpConstructor {
2705
+ new (pattern: RegExp | string, flags?: string): RegExp;
2706
+ (pattern: RegExp | string, flags?: string): RegExp;
2707
+ }
2708
+
2709
+ interface String {
2710
+ /**
2711
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
2712
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
2713
+ * the String resulting from converting this object to a String.
2714
+ * If there is no element at that position, the result is undefined.
2715
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
2716
+ */
2717
+ codePointAt(pos: number): number | undefined;
2718
+
2719
+ /**
2720
+ * Returns true if searchString appears as a substring of the result of converting this
2721
+ * object to a String, at one or more positions that are
2722
+ * greater than or equal to position; otherwise, returns false.
2723
+ * @param searchString search string
2724
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
2725
+ */
2726
+ includes(searchString: string, position?: number): boolean;
2727
+
2728
+ /**
2729
+ * Returns true if the sequence of elements of searchString converted to a String is the
2730
+ * same as the corresponding elements of this object (converted to a String) starting at
2731
+ * endPosition – length(this). Otherwise returns false.
2732
+ */
2733
+ endsWith(searchString: string, endPosition?: number): boolean;
2734
+
2735
+ /**
2736
+ * Returns the String value result of normalizing the string into the normalization form
2737
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
2738
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
2739
+ * is "NFC"
2740
+ */
2741
+ normalize(form: 'NFC' | 'NFD' | 'NFKC' | 'NFKD'): string;
2742
+
2743
+ /**
2744
+ * Returns the String value result of normalizing the string into the normalization form
2745
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
2746
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
2747
+ * is "NFC"
2748
+ */
2749
+ normalize(form?: string): string;
2750
+
2751
+ /**
2752
+ * Returns a String value that is made from count copies appended together. If count is 0,
2753
+ * the empty string is returned.
2754
+ * @param count number of copies to append
2755
+ */
2756
+ repeat(count: number): string;
2757
+
2758
+ /**
2759
+ * Returns true if the sequence of elements of searchString converted to a String is the
2760
+ * same as the corresponding elements of this object (converted to a String) starting at
2761
+ * position. Otherwise returns false.
2762
+ */
2763
+ startsWith(searchString: string, position?: number): boolean;
2764
+
2765
+ /**
2766
+ * Returns an `<a>` HTML anchor element and sets the name attribute to the text value
2767
+ * @deprecated A legacy feature for browser compatibility
2768
+ * @param name
2769
+ */
2770
+ anchor(name: string): string;
2771
+
2772
+ /**
2773
+ * Returns a `<big>` HTML element
2774
+ * @deprecated A legacy feature for browser compatibility
2775
+ */
2776
+ big(): string;
2777
+
2778
+ /**
2779
+ * Returns a `<blink>` HTML element
2780
+ * @deprecated A legacy feature for browser compatibility
2781
+ */
2782
+ blink(): string;
2783
+
2784
+ /**
2785
+ * Returns a `<b>` HTML element
2786
+ * @deprecated A legacy feature for browser compatibility
2787
+ */
2788
+ bold(): string;
2789
+
2790
+ /**
2791
+ * Returns a `<tt>` HTML element
2792
+ * @deprecated A legacy feature for browser compatibility
2793
+ */
2794
+ fixed(): string;
2795
+
2796
+ /**
2797
+ * Returns a `<font>` HTML element and sets the color attribute value
2798
+ * @deprecated A legacy feature for browser compatibility
2799
+ */
2800
+ fontcolor(color: string): string;
2801
+
2802
+ /**
2803
+ * Returns a `<font>` HTML element and sets the size attribute value
2804
+ * @deprecated A legacy feature for browser compatibility
2805
+ */
2806
+ fontsize(size: number): string;
2807
+
2808
+ /**
2809
+ * Returns a `<font>` HTML element and sets the size attribute value
2810
+ * @deprecated A legacy feature for browser compatibility
2811
+ */
2812
+ fontsize(size: string): string;
2813
+
2814
+ /**
2815
+ * Returns an `<i>` HTML element
2816
+ * @deprecated A legacy feature for browser compatibility
2817
+ */
2818
+ italics(): string;
2819
+
2820
+ /**
2821
+ * Returns an `<a>` HTML element and sets the href attribute value
2822
+ * @deprecated A legacy feature for browser compatibility
2823
+ */
2824
+ link(url: string): string;
2825
+
2826
+ /**
2827
+ * Returns a `<small>` HTML element
2828
+ * @deprecated A legacy feature for browser compatibility
2829
+ */
2830
+ small(): string;
2831
+
2832
+ /**
2833
+ * Returns a `<strike>` HTML element
2834
+ * @deprecated A legacy feature for browser compatibility
2835
+ */
2836
+ strike(): string;
2837
+
2838
+ /**
2839
+ * Returns a `<sub>` HTML element
2840
+ * @deprecated A legacy feature for browser compatibility
2841
+ */
2842
+ sub(): string;
2843
+
2844
+ /**
2845
+ * Returns a `<sup>` HTML element
2846
+ * @deprecated A legacy feature for browser compatibility
2847
+ */
2848
+ sup(): string;
2849
+ }
2850
+
2851
+ interface StringConstructor {
2852
+ /**
2853
+ * Return the String value whose elements are, in order, the elements in the List elements.
2854
+ * If length is 0, the empty string is returned.
2855
+ */
2856
+ fromCodePoint(...codePoints: number[]): string;
2857
+
2858
+ /**
2859
+ * String.raw is usually used as a tag function of a Tagged Template String. When called as
2860
+ * such, the first argument will be a well formed template call site object and the rest
2861
+ * parameter will contain the substitution values. It can also be called directly, for example,
2862
+ * to interleave strings and values from your own tag function, and in this case the only thing
2863
+ * it needs from the first argument is the raw property.
2864
+ * @param template A well-formed template string call site representation.
2865
+ * @param substitutions A set of substitution values.
2866
+ */
2867
+ raw(
2868
+ template: {raw: readonly string[] | ArrayLike<string>},
2869
+ ...substitutions: any[]
2870
+ ): string;
2871
+ }
2872
+ // #endregion
2873
+
2874
+ // #region es2015.collection TypeScript lib content
2875
+ interface Map<K, V> {
2876
+ clear(): void;
2877
+ /**
2878
+ * @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
2879
+ */
2880
+ delete(key: K): boolean;
2881
+ /**
2882
+ * Executes a provided function once per each key/value pair in the Map, in insertion order.
2883
+ */
2884
+ forEach(
2885
+ callbackfn: (value: V, key: K, map: Map<K, V>) => void,
2886
+ thisArg?: any,
2887
+ ): void;
2888
+ /**
2889
+ * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
2890
+ * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
2891
+ */
2892
+ get(key: K): V | undefined;
2893
+ /**
2894
+ * @returns boolean indicating whether an element with the specified key exists or not.
2895
+ */
2896
+ has(key: K): boolean;
2897
+ /**
2898
+ * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
2899
+ */
2900
+ set(key: K, value: V): this;
2901
+ /**
2902
+ * @returns the number of elements in the Map.
2903
+ */
2904
+ readonly size: number;
2905
+ }
2906
+
2907
+ interface MapConstructor {
2908
+ new (): Map<any, any>;
2909
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
2910
+ readonly prototype: Map<any, any>;
2911
+ }
2912
+ declare var Map: MapConstructor;
2913
+
2914
+ interface ReadonlyMap<K, V> {
2915
+ forEach(
2916
+ callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void,
2917
+ thisArg?: any,
2918
+ ): void;
2919
+ get(key: K): V | undefined;
2920
+ has(key: K): boolean;
2921
+ readonly size: number;
2922
+ }
2923
+
2924
+ interface Set<T> {
2925
+ /**
2926
+ * Appends a new element with a specified value to the end of the Set.
2927
+ */
2928
+ add(value: T): this;
2929
+
2930
+ clear(): void;
2931
+ /**
2932
+ * Removes a specified value from the Set.
2933
+ * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
2934
+ */
2935
+ delete(value: T): boolean;
2936
+ /**
2937
+ * Executes a provided function once per each value in the Set object, in insertion order.
2938
+ */
2939
+ forEach(
2940
+ callbackfn: (value: T, value2: T, set: Set<T>) => void,
2941
+ thisArg?: any,
2942
+ ): void;
2943
+ /**
2944
+ * @returns a boolean indicating whether an element with the specified value exists in the Set or not.
2945
+ */
2946
+ has(value: T): boolean;
2947
+ /**
2948
+ * @returns the number of (unique) elements in Set.
2949
+ */
2950
+ readonly size: number;
2951
+ }
2952
+
2953
+ interface SetConstructor {
2954
+ new <T = any>(values?: readonly T[] | null): Set<T>;
2955
+ readonly prototype: Set<any>;
2956
+ }
2957
+ declare var Set: SetConstructor;
2958
+
2959
+ interface ReadonlySet<T> {
2960
+ forEach(
2961
+ callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void,
2962
+ thisArg?: any,
2963
+ ): void;
2964
+ has(value: T): boolean;
2965
+ readonly size: number;
2966
+ }
2967
+ // #endregion
2968
+
2969
+ // #region es2015.symbol TypeScript lib content
2970
+ interface SymbolConstructor {
2971
+ /**
2972
+ * A reference to the prototype.
2973
+ */
2974
+ readonly prototype: Symbol;
2975
+
2976
+ /**
2977
+ * Returns a new unique Symbol value.
2978
+ * @param description Description of the new Symbol object.
2979
+ */
2980
+ (description?: string | number): symbol;
2981
+
2982
+ /**
2983
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
2984
+ * Otherwise, returns a new symbol with this key.
2985
+ * @param key key to search for.
2986
+ */
2987
+ for(key: string): symbol;
2988
+
2989
+ /**
2990
+ * Returns a key from the global symbol registry matching the given Symbol if found.
2991
+ * Otherwise, returns a undefined.
2992
+ * @param sym Symbol to find the key for.
2993
+ */
2994
+ keyFor(sym: symbol): string | undefined;
2995
+ }
2996
+
2997
+ declare var Symbol: SymbolConstructor;
2998
+ // #endregion
2999
+
3000
+ // #region es2015.iterable TypeScript lib content
3001
+ interface SymbolConstructor {
3002
+ /**
3003
+ * A method that returns the default iterator for an object. Called by the semantics of the
3004
+ * for-of statement.
3005
+ */
3006
+ readonly iterator: unique symbol;
3007
+ }
3008
+
3009
+ interface Iterator<T, TReturn = any, TNext = any> {
3010
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
3011
+ next(...[value]: [] | [TNext]): IteratorResult<T, TReturn>;
3012
+ return?(value?: TReturn): IteratorResult<T, TReturn>;
3013
+ throw?(e?: any): IteratorResult<T, TReturn>;
3014
+ }
3015
+
3016
+ interface Iterable<T, TReturn = any, TNext = any> {
3017
+ [Symbol.iterator](): Iterator<T, TReturn, TNext>;
3018
+ }
3019
+
3020
+ /**
3021
+ * Describes a user-defined {@link Iterator} that is also iterable.
3022
+ */
3023
+ interface IterableIterator<T, TReturn = any, TNext = any>
3024
+ extends Iterator<T, TReturn, TNext> {
3025
+ [Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
3026
+ }
3027
+
3028
+ /**
3029
+ * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`.
3030
+ */
3031
+ interface IteratorObject<T, TReturn = unknown, TNext = unknown>
3032
+ extends Iterator<T, TReturn, TNext> {
3033
+ [Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
3034
+ }
3035
+
3036
+ /**
3037
+ * Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others.
3038
+ * This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`.
3039
+ */
3040
+ type BuiltinIteratorReturn = intrinsic;
3041
+
3042
+ interface ArrayIterator<T>
3043
+ extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
3044
+ [Symbol.iterator](): ArrayIterator<T>;
3045
+ }
3046
+
3047
+ interface Array<T> {
3048
+ /** Iterator */
3049
+ [Symbol.iterator](): ArrayIterator<T>;
3050
+
3051
+ /**
3052
+ * Returns an iterable of key, value pairs for every entry in the array
3053
+ */
3054
+ entries(): ArrayIterator<[number, T]>;
3055
+
3056
+ /**
3057
+ * Returns an iterable of keys in the array
3058
+ */
3059
+ keys(): ArrayIterator<number>;
3060
+
3061
+ /**
3062
+ * Returns an iterable of values in the array
3063
+ */
3064
+ values(): ArrayIterator<T>;
3065
+ }
3066
+
3067
+ interface ArrayConstructor {
3068
+ /**
3069
+ * Creates an array from an iterable object.
3070
+ * @param iterable An iterable object to convert to an array.
3071
+ */
3072
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
3073
+
3074
+ /**
3075
+ * Creates an array from an iterable object.
3076
+ * @param iterable An iterable object to convert to an array.
3077
+ * @param mapfn A mapping function to call on every element of the array.
3078
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3079
+ */
3080
+ from<T, U>(
3081
+ iterable: Iterable<T> | ArrayLike<T>,
3082
+ mapfn: (v: T, k: number) => U,
3083
+ thisArg?: any,
3084
+ ): U[];
3085
+ }
3086
+
3087
+ interface ReadonlyArray<T> {
3088
+ /** Iterator of values in the array. */
3089
+ [Symbol.iterator](): ArrayIterator<T>;
3090
+
3091
+ /**
3092
+ * Returns an iterable of key, value pairs for every entry in the array
3093
+ */
3094
+ entries(): ArrayIterator<[number, T]>;
3095
+
3096
+ /**
3097
+ * Returns an iterable of keys in the array
3098
+ */
3099
+ keys(): ArrayIterator<number>;
3100
+
3101
+ /**
3102
+ * Returns an iterable of values in the array
3103
+ */
3104
+ values(): ArrayIterator<T>;
3105
+ }
3106
+
3107
+ interface IArguments {
3108
+ /** Iterator */
3109
+ [Symbol.iterator](): ArrayIterator<any>;
3110
+ }
3111
+
3112
+ interface MapIterator<T>
3113
+ extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
3114
+ [Symbol.iterator](): MapIterator<T>;
3115
+ }
3116
+
3117
+ interface Map<K, V> {
3118
+ /** Returns an iterable of entries in the map. */
3119
+ [Symbol.iterator](): MapIterator<[K, V]>;
3120
+
3121
+ /**
3122
+ * Returns an iterable of key, value pairs for every entry in the map.
3123
+ */
3124
+ entries(): MapIterator<[K, V]>;
3125
+
3126
+ /**
3127
+ * Returns an iterable of keys in the map
3128
+ */
3129
+ keys(): MapIterator<K>;
3130
+
3131
+ /**
3132
+ * Returns an iterable of values in the map
3133
+ */
3134
+ values(): MapIterator<V>;
3135
+ }
3136
+
3137
+ interface ReadonlyMap<K, V> {
3138
+ /** Returns an iterable of entries in the map. */
3139
+ [Symbol.iterator](): MapIterator<[K, V]>;
3140
+
3141
+ /**
3142
+ * Returns an iterable of key, value pairs for every entry in the map.
3143
+ */
3144
+ entries(): MapIterator<[K, V]>;
3145
+
3146
+ /**
3147
+ * Returns an iterable of keys in the map
3148
+ */
3149
+ keys(): MapIterator<K>;
3150
+
3151
+ /**
3152
+ * Returns an iterable of values in the map
3153
+ */
3154
+ values(): MapIterator<V>;
3155
+ }
3156
+
3157
+ interface MapConstructor {
3158
+ new (): Map<any, any>;
3159
+ new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
3160
+ }
3161
+
3162
+ interface SetIterator<T>
3163
+ extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
3164
+ [Symbol.iterator](): SetIterator<T>;
3165
+ }
3166
+
3167
+ interface Set<T> {
3168
+ /** Iterates over values in the set. */
3169
+ [Symbol.iterator](): SetIterator<T>;
3170
+
3171
+ /**
3172
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
3173
+ */
3174
+ entries(): SetIterator<[T, T]>;
3175
+
3176
+ /**
3177
+ * Despite its name, returns an iterable of the values in the set.
3178
+ */
3179
+ keys(): SetIterator<T>;
3180
+
3181
+ /**
3182
+ * Returns an iterable of values in the set.
3183
+ */
3184
+ values(): SetIterator<T>;
3185
+ }
3186
+
3187
+ interface ReadonlySet<T> {
3188
+ /** Iterates over values in the set. */
3189
+ [Symbol.iterator](): SetIterator<T>;
3190
+
3191
+ /**
3192
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
3193
+ */
3194
+ entries(): SetIterator<[T, T]>;
3195
+
3196
+ /**
3197
+ * Despite its name, returns an iterable of the values in the set.
3198
+ */
3199
+ keys(): SetIterator<T>;
3200
+
3201
+ /**
3202
+ * Returns an iterable of values in the set.
3203
+ */
3204
+ values(): SetIterator<T>;
3205
+ }
3206
+
3207
+ interface SetConstructor {
3208
+ new <T>(iterable?: Iterable<T> | null): Set<T>;
3209
+ }
3210
+
3211
+ interface StringIterator<T>
3212
+ extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
3213
+ [Symbol.iterator](): StringIterator<T>;
3214
+ }
3215
+
3216
+ interface String {
3217
+ /** Iterator */
3218
+ [Symbol.iterator](): StringIterator<string>;
3219
+ }
3220
+ // #endregion
3221
+
3222
+ // #region es2015.symbol.wellknown TypeScript lib content
3223
+ interface SymbolConstructor {
3224
+ /**
3225
+ * A method that determines if a constructor object recognizes an object as one of the
3226
+ * constructor’s instances. Called by the semantics of the instanceof operator.
3227
+ */
3228
+ readonly hasInstance: unique symbol;
3229
+
3230
+ /**
3231
+ * A Boolean value that if true indicates that an object should flatten to its array elements
3232
+ * by Array.prototype.concat.
3233
+ */
3234
+ readonly isConcatSpreadable: unique symbol;
3235
+
3236
+ /**
3237
+ * A regular expression method that matches the regular expression against a string. Called
3238
+ * by the String.prototype.match method.
3239
+ */
3240
+ readonly match: unique symbol;
3241
+
3242
+ /**
3243
+ * A regular expression method that replaces matched substrings of a string. Called by the
3244
+ * String.prototype.replace method.
3245
+ */
3246
+ readonly replace: unique symbol;
3247
+
3248
+ /**
3249
+ * A regular expression method that returns the index within a string that matches the
3250
+ * regular expression. Called by the String.prototype.search method.
3251
+ */
3252
+ readonly search: unique symbol;
3253
+
3254
+ /**
3255
+ * A function valued property that is the constructor function that is used to create
3256
+ * derived objects.
3257
+ */
3258
+ readonly species: unique symbol;
3259
+
3260
+ /**
3261
+ * A regular expression method that splits a string at the indices that match the regular
3262
+ * expression. Called by the String.prototype.split method.
3263
+ */
3264
+ readonly split: unique symbol;
3265
+
3266
+ /**
3267
+ * A method that converts an object to a corresponding primitive value.
3268
+ * Called by the ToPrimitive abstract operation.
3269
+ */
3270
+ readonly toPrimitive: unique symbol;
3271
+
3272
+ /**
3273
+ * A String value that is used in the creation of the default string description of an object.
3274
+ * Called by the built-in method Object.prototype.toString.
3275
+ */
3276
+ readonly toStringTag: unique symbol;
3277
+
3278
+ /**
3279
+ * An Object whose truthy properties are properties that are excluded from the 'with'
3280
+ * environment bindings of the associated objects.
3281
+ */
3282
+ readonly unscopables: unique symbol;
3283
+ }
3284
+
3285
+ interface Symbol {
3286
+ /**
3287
+ * Converts a Symbol object to a symbol.
3288
+ */
3289
+ [Symbol.toPrimitive](hint: string): symbol;
3290
+
3291
+ readonly [Symbol.toStringTag]: string;
3292
+ }
3293
+
3294
+ interface Array<T> {
3295
+ /**
3296
+ * Is an object whose properties have the value 'true'
3297
+ * when they will be absent when used in a 'with' statement.
3298
+ */
3299
+ readonly [Symbol.unscopables]: {
3300
+ [K in keyof any[]]?: boolean;
3301
+ };
3302
+ }
3303
+
3304
+ interface ReadonlyArray<T> {
3305
+ /**
3306
+ * Is an object whose properties have the value 'true'
3307
+ * when they will be absent when used in a 'with' statement.
3308
+ */
3309
+ readonly [Symbol.unscopables]: {
3310
+ [K in keyof (readonly any[])]?: boolean;
3311
+ };
3312
+ }
3313
+
3314
+ interface Date {
3315
+ /**
3316
+ * Converts a Date object to a string.
3317
+ */
3318
+ [Symbol.toPrimitive](hint: 'default'): string;
3319
+ /**
3320
+ * Converts a Date object to a string.
3321
+ */
3322
+ [Symbol.toPrimitive](hint: 'string'): string;
3323
+ /**
3324
+ * Converts a Date object to a number.
3325
+ */
3326
+ [Symbol.toPrimitive](hint: 'number'): number;
3327
+ /**
3328
+ * Converts a Date object to a string or number.
3329
+ *
3330
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
3331
+ *
3332
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
3333
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
3334
+ */
3335
+ [Symbol.toPrimitive](hint: string): string | number;
3336
+ }
3337
+
3338
+ interface Map<K, V> {
3339
+ readonly [Symbol.toStringTag]: string;
3340
+ }
3341
+
3342
+ interface Set<T> {
3343
+ readonly [Symbol.toStringTag]: string;
3344
+ }
3345
+
3346
+ interface JSON {
3347
+ readonly [Symbol.toStringTag]: string;
3348
+ }
3349
+
3350
+ interface Function {
3351
+ /**
3352
+ * Determines whether the given value inherits from this function if this function was used
3353
+ * as a constructor function.
3354
+ *
3355
+ * A constructor function can control which objects are recognized as its instances by
3356
+ * 'instanceof' by overriding this method.
3357
+ */
3358
+ [Symbol.hasInstance](value: any): boolean;
3359
+ }
3360
+
3361
+ interface Math {
3362
+ readonly [Symbol.toStringTag]: string;
3363
+ }
3364
+
3365
+ interface RegExp {
3366
+ /**
3367
+ * Matches a string with this regular expression, and returns an array containing the results of
3368
+ * that search.
3369
+ * @param string A string to search within.
3370
+ */
3371
+ [Symbol.match](string: string): RegExpMatchArray | null;
3372
+
3373
+ /**
3374
+ * Replaces text in a string, using this regular expression.
3375
+ * @param string A String object or string literal whose contents matching against
3376
+ * this regular expression will be replaced
3377
+ * @param replaceValue A String object or string literal containing the text to replace for every
3378
+ * successful match of this regular expression.
3379
+ */
3380
+ [Symbol.replace](string: string, replaceValue: string): string;
3381
+
3382
+ /**
3383
+ * Replaces text in a string, using this regular expression.
3384
+ * @param string A String object or string literal whose contents matching against
3385
+ * this regular expression will be replaced
3386
+ * @param replacer A function that returns the replacement text.
3387
+ */
3388
+ [Symbol.replace](
3389
+ string: string,
3390
+ replacer: (substring: string, ...args: any[]) => string,
3391
+ ): string;
3392
+
3393
+ /**
3394
+ * Finds the position beginning first substring match in a regular expression search
3395
+ * using this regular expression.
3396
+ *
3397
+ * @param string The string to search within.
3398
+ */
3399
+ [Symbol.search](string: string): number;
3400
+
3401
+ /**
3402
+ * Returns an array of substrings that were delimited by strings in the original input that
3403
+ * match against this regular expression.
3404
+ *
3405
+ * If the regular expression contains capturing parentheses, then each time this
3406
+ * regular expression matches, the results (including any undefined results) of the
3407
+ * capturing parentheses are spliced.
3408
+ *
3409
+ * @param string string value to split
3410
+ * @param limit if not undefined, the output array is truncated so that it contains no more
3411
+ * than 'limit' elements.
3412
+ */
3413
+ [Symbol.split](string: string, limit?: number): string[];
3414
+ }
3415
+
3416
+ interface RegExpConstructor {
3417
+ readonly [Symbol.species]: RegExpConstructor;
3418
+ }
3419
+
3420
+ interface String {
3421
+ /**
3422
+ * Matches a string or an object that supports being matched against, and returns an array
3423
+ * containing the results of that search, or null if no matches are found.
3424
+ * @param matcher An object that supports being matched against.
3425
+ */
3426
+ match(matcher: {
3427
+ [Symbol.match](string: string): RegExpMatchArray | null;
3428
+ }): RegExpMatchArray | null;
3429
+
3430
+ /**
3431
+ * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.
3432
+ * @param searchValue An object that supports searching for and replacing matches within a string.
3433
+ * @param replaceValue The replacement text.
3434
+ */
3435
+ replace(
3436
+ searchValue: {
3437
+ [Symbol.replace](string: string, replaceValue: string): string;
3438
+ },
3439
+ replaceValue: string,
3440
+ ): string;
3441
+
3442
+ /**
3443
+ * Replaces text in a string, using an object that supports replacement within a string.
3444
+ * @param searchValue A object can search for and replace matches within a string.
3445
+ * @param replacer A function that returns the replacement text.
3446
+ */
3447
+ replace(
3448
+ searchValue: {
3449
+ [Symbol.replace](
3450
+ string: string,
3451
+ replacer: (substring: string, ...args: any[]) => string,
3452
+ ): string;
3453
+ },
3454
+ replacer: (substring: string, ...args: any[]) => string,
3455
+ ): string;
3456
+
3457
+ /**
3458
+ * Finds the first substring match in a regular expression search.
3459
+ * @param searcher An object which supports searching within a string.
3460
+ */
3461
+ search(searcher: {[Symbol.search](string: string): number}): number;
3462
+
3463
+ /**
3464
+ * Split a string into substrings using the specified separator and return them as an array.
3465
+ * @param splitter An object that can split a string.
3466
+ * @param limit A value used to limit the number of elements returned in the array.
3467
+ */
3468
+ split(
3469
+ splitter: {[Symbol.split](string: string, limit?: number): string[]},
3470
+ limit?: number,
3471
+ ): string[];
3472
+ }
3473
+
3474
+ interface ArrayConstructor {
3475
+ readonly [Symbol.species]: ArrayConstructor;
3476
+ }
3477
+ interface MapConstructor {
3478
+ readonly [Symbol.species]: MapConstructor;
3479
+ }
3480
+ interface SetConstructor {
3481
+ readonly [Symbol.species]: SetConstructor;
3482
+ }
3483
+ // #endregion
3484
+
3485
+ // #region es2016.array.include TypeScript lib content
3486
+ interface Array<T> {
3487
+ /**
3488
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
3489
+ * @param searchElement The element to search for.
3490
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
3491
+ */
3492
+ includes(searchElement: T, fromIndex?: number): boolean;
3493
+ }
3494
+
3495
+ interface ReadonlyArray<T> {
3496
+ /**
3497
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
3498
+ * @param searchElement The element to search for.
3499
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
3500
+ */
3501
+ includes(searchElement: T, fromIndex?: number): boolean;
3502
+ }
3503
+ // #endregion
3504
+
3505
+ // #region es2017.date TypeScript lib content
3506
+ interface DateConstructor {
3507
+ /**
3508
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
3509
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
3510
+ * @param monthIndex The month as a number between 0 and 11 (January to December).
3511
+ * @param date The date as a number between 1 and 31.
3512
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
3513
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
3514
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
3515
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
3516
+ */
3517
+ UTC(
3518
+ year: number,
3519
+ monthIndex?: number,
3520
+ date?: number,
3521
+ hours?: number,
3522
+ minutes?: number,
3523
+ seconds?: number,
3524
+ ms?: number,
3525
+ ): number;
3526
+ }
3527
+ // #endregion
3528
+
3529
+ // #region es2017.object TypeScript lib content
3530
+ interface ObjectConstructor {
3531
+ /**
3532
+ * Returns an array of values of the enumerable own properties of an object
3533
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
3534
+ */
3535
+ values<T>(o: {[s: string]: T} | ArrayLike<T>): T[];
3536
+
3537
+ /**
3538
+ * Returns an array of values of the enumerable own properties of an object
3539
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
3540
+ */
3541
+ values(o: {}): any[];
3542
+
3543
+ /**
3544
+ * Returns an array of key/values of the enumerable own properties of an object
3545
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
3546
+ */
3547
+ entries<T>(o: {[s: string]: T} | ArrayLike<T>): [string, T][];
3548
+
3549
+ /**
3550
+ * Returns an array of key/values of the enumerable own properties of an object
3551
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
3552
+ */
3553
+ entries(o: {}): [string, any][];
3554
+
3555
+ /**
3556
+ * Returns an object containing all own property descriptors of an object
3557
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
3558
+ */
3559
+ getOwnPropertyDescriptors<T>(
3560
+ o: T,
3561
+ ): {[P in keyof T]: TypedPropertyDescriptor<T[P]>} & {
3562
+ [x: string]: PropertyDescriptor;
3563
+ };
3564
+ }
3565
+ // #endregion
3566
+
3567
+ // #region es2017.string TypeScript lib content
3568
+ interface String {
3569
+ /**
3570
+ * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
3571
+ * The padding is applied from the start (left) of the current string.
3572
+ *
3573
+ * @param maxLength The length of the resulting string once the current string has been padded.
3574
+ * If this parameter is smaller than the current string's length, the current string will be returned as it is.
3575
+ *
3576
+ * @param fillString The string to pad the current string with.
3577
+ * If this string is too long, it will be truncated and the left-most part will be applied.
3578
+ * The default value for this parameter is " " (U+0020).
3579
+ */
3580
+ padStart(maxLength: number, fillString?: string): string;
3581
+
3582
+ /**
3583
+ * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
3584
+ * The padding is applied from the end (right) of the current string.
3585
+ *
3586
+ * @param maxLength The length of the resulting string once the current string has been padded.
3587
+ * If this parameter is smaller than the current string's length, the current string will be returned as it is.
3588
+ *
3589
+ * @param fillString The string to pad the current string with.
3590
+ * If this string is too long, it will be truncated and the left-most part will be applied.
3591
+ * The default value for this parameter is " " (U+0020).
3592
+ */
3593
+ padEnd(maxLength: number, fillString?: string): string;
3594
+ }
3595
+ // #endregion
3596
+
3597
+ // #region es2018.asyncgenerator TypeScript lib content
3598
+ interface AsyncGenerator<T = unknown, TReturn = any, TNext = any>
3599
+ extends AsyncIteratorObject<T, TReturn, TNext> {
3600
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
3601
+ next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
3602
+ return(
3603
+ value: TReturn | PromiseLike<TReturn>,
3604
+ ): Promise<IteratorResult<T, TReturn>>;
3605
+ throw(e: any): Promise<IteratorResult<T, TReturn>>;
3606
+ [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
3607
+ }
3608
+
3609
+ interface AsyncGeneratorFunction {
3610
+ /**
3611
+ * Creates a new AsyncGenerator object.
3612
+ * @param args A list of arguments the function accepts.
3613
+ */
3614
+ new (...args: any[]): AsyncGenerator;
3615
+ /**
3616
+ * Creates a new AsyncGenerator object.
3617
+ * @param args A list of arguments the function accepts.
3618
+ */
3619
+ (...args: any[]): AsyncGenerator;
3620
+ /**
3621
+ * The length of the arguments.
3622
+ */
3623
+ readonly length: number;
3624
+ /**
3625
+ * Returns the name of the function.
3626
+ */
3627
+ readonly name: string;
3628
+ /**
3629
+ * A reference to the prototype.
3630
+ */
3631
+ readonly prototype: AsyncGenerator;
3632
+ }
3633
+
3634
+ interface AsyncGeneratorFunctionConstructor {
3635
+ /**
3636
+ * Creates a new AsyncGenerator function.
3637
+ * @param args A list of arguments the function accepts.
3638
+ */
3639
+ new (...args: string[]): AsyncGeneratorFunction;
3640
+ /**
3641
+ * Creates a new AsyncGenerator function.
3642
+ * @param args A list of arguments the function accepts.
3643
+ */
3644
+ (...args: string[]): AsyncGeneratorFunction;
3645
+ /**
3646
+ * The length of the arguments.
3647
+ */
3648
+ readonly length: number;
3649
+ /**
3650
+ * Returns the name of the function.
3651
+ */
3652
+ readonly name: string;
3653
+ /**
3654
+ * A reference to the prototype.
3655
+ */
3656
+ readonly prototype: AsyncGeneratorFunction;
3657
+ }
3658
+ // #endregion
3659
+
3660
+ // #region es2018.regexp TypeScript lib content
3661
+ interface RegExpMatchArray {
3662
+ groups?: {
3663
+ [key: string]: string;
3664
+ };
3665
+ }
3666
+
3667
+ interface RegExpExecArray {
3668
+ groups?: {
3669
+ [key: string]: string;
3670
+ };
3671
+ }
3672
+
3673
+ interface RegExp {
3674
+ /**
3675
+ * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression.
3676
+ * Default is false. Read-only.
3677
+ */
3678
+ readonly dotAll: boolean;
3679
+ }
3680
+ // #endregion
3681
+
3682
+ // #region es2019.array TypeScript lib content
3683
+ type FlatArray<Arr, Depth extends number> = {
3684
+ done: Arr;
3685
+ recur: Arr extends ReadonlyArray<infer InnerArr>
3686
+ ? FlatArray<
3687
+ InnerArr,
3688
+ [
3689
+ -1,
3690
+ 0,
3691
+ 1,
3692
+ 2,
3693
+ 3,
3694
+ 4,
3695
+ 5,
3696
+ 6,
3697
+ 7,
3698
+ 8,
3699
+ 9,
3700
+ 10,
3701
+ 11,
3702
+ 12,
3703
+ 13,
3704
+ 14,
3705
+ 15,
3706
+ 16,
3707
+ 17,
3708
+ 18,
3709
+ 19,
3710
+ 20,
3711
+ ][Depth]
3712
+ >
3713
+ : Arr;
3714
+ }[Depth extends -1 ? 'done' : 'recur'];
3715
+
3716
+ interface ReadonlyArray<T> {
3717
+ /**
3718
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
3719
+ * a new array.
3720
+ * This is identical to a map followed by flat with depth 1.
3721
+ *
3722
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
3723
+ * callback function one time for each element in the array.
3724
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
3725
+ * thisArg is omitted, undefined is used as the this value.
3726
+ */
3727
+ flatMap<U, This = undefined>(
3728
+ callback: (
3729
+ this: This,
3730
+ value: T,
3731
+ index: number,
3732
+ array: T[],
3733
+ ) => U | ReadonlyArray<U>,
3734
+ thisArg?: This,
3735
+ ): U[];
3736
+
3737
+ /**
3738
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
3739
+ * specified depth.
3740
+ *
3741
+ * @param depth The maximum recursion depth
3742
+ */
3743
+ flat<A, D extends number = 1>(this: A, depth?: D): FlatArray<A, D>[];
3744
+ }
3745
+
3746
+ interface Array<T> {
3747
+ /**
3748
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
3749
+ * a new array.
3750
+ * This is identical to a map followed by flat with depth 1.
3751
+ *
3752
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
3753
+ * callback function one time for each element in the array.
3754
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
3755
+ * thisArg is omitted, undefined is used as the this value.
3756
+ */
3757
+ flatMap<U, This = undefined>(
3758
+ callback: (
3759
+ this: This,
3760
+ value: T,
3761
+ index: number,
3762
+ array: T[],
3763
+ ) => U | ReadonlyArray<U>,
3764
+ thisArg?: This,
3765
+ ): U[];
3766
+
3767
+ /**
3768
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
3769
+ * specified depth.
3770
+ *
3771
+ * @param depth The maximum recursion depth
3772
+ */
3773
+ flat<A, D extends number = 1>(this: A, depth?: D): FlatArray<A, D>[];
3774
+ }
3775
+ // #endregion
3776
+
3777
+ // #region es2019.object TypeScript lib content
3778
+ interface ObjectConstructor {
3779
+ /**
3780
+ * Returns an object created by key-value entries for properties and methods
3781
+ * @param entries An iterable object that contains key-value entries for properties and methods.
3782
+ */
3783
+ fromEntries<T = any>(
3784
+ entries: Iterable<readonly [PropertyKey, T]>,
3785
+ ): {[k: string]: T};
3786
+
3787
+ /**
3788
+ * Returns an object created by key-value entries for properties and methods
3789
+ * @param entries An iterable object that contains key-value entries for properties and methods.
3790
+ */
3791
+ fromEntries(entries: Iterable<readonly any[]>): any;
3792
+ }
3793
+ // #endregion
3794
+
3795
+ // #region es2019.string TypeScript lib content
3796
+ interface String {
3797
+ /** Removes the trailing white space and line terminator characters from a string. */
3798
+ trimEnd(): string;
3799
+
3800
+ /** Removes the leading white space and line terminator characters from a string. */
3801
+ trimStart(): string;
3802
+
3803
+ /**
3804
+ * Removes the leading white space and line terminator characters from a string.
3805
+ * @deprecated A legacy feature for browser compatibility. Use `trimStart` instead
3806
+ */
3807
+ trimLeft(): string;
3808
+
3809
+ /**
3810
+ * Removes the trailing white space and line terminator characters from a string.
3811
+ * @deprecated A legacy feature for browser compatibility. Use `trimEnd` instead
3812
+ */
3813
+ trimRight(): string;
3814
+ }
3815
+ // #endregion
3816
+
3817
+ // #region es2019.symbol TypeScript lib content
3818
+ interface Symbol {
3819
+ /**
3820
+ * Expose the [[Description]] internal slot of a symbol directly.
3821
+ */
3822
+ readonly description: string | undefined;
3823
+ }
3824
+ // #endregion
3825
+
3826
+ // #region es2020.date TypeScript lib content
3827
+ interface Date {
3828
+ /**
3829
+ * Converts a date and time to a string by using the current or specified locale.
3830
+ * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
3831
+ * @param options An object that contains one or more properties that specify comparison options.
3832
+ */
3833
+ toLocaleString(
3834
+ locales?: Intl.LocalesArgument,
3835
+ options?: Intl.DateTimeFormatOptions,
3836
+ ): string;
3837
+
3838
+ /**
3839
+ * Converts a date to a string by using the current or specified locale.
3840
+ * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
3841
+ * @param options An object that contains one or more properties that specify comparison options.
3842
+ */
3843
+ toLocaleDateString(
3844
+ locales?: Intl.LocalesArgument,
3845
+ options?: Intl.DateTimeFormatOptions,
3846
+ ): string;
3847
+
3848
+ /**
3849
+ * Converts a time to a string by using the current or specified locale.
3850
+ * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
3851
+ * @param options An object that contains one or more properties that specify comparison options.
3852
+ */
3853
+ toLocaleTimeString(
3854
+ locales?: Intl.LocalesArgument,
3855
+ options?: Intl.DateTimeFormatOptions,
3856
+ ): string;
3857
+ }
3858
+ // #endregion
3859
+
3860
+ // #region es2020.number TypeScript lib content
3861
+ interface Number {
3862
+ /**
3863
+ * Converts a number to a string by using the current or specified locale.
3864
+ * @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
3865
+ * @param options An object that contains one or more properties that specify comparison options.
3866
+ */
3867
+ toLocaleString(
3868
+ locales?: Intl.LocalesArgument,
3869
+ options?: Intl.NumberFormatOptions,
3870
+ ): string;
3871
+ }
3872
+ // #endregion
3873
+
3874
+ // #region es2020.symbol.wellknown TypeScript lib content
3875
+ interface SymbolConstructor {
3876
+ /**
3877
+ * A regular expression method that matches the regular expression against a string. Called
3878
+ * by the String.prototype.matchAll method.
3879
+ */
3880
+ readonly matchAll: unique symbol;
3881
+ }
3882
+
3883
+ interface RegExpStringIterator<T>
3884
+ extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
3885
+ [Symbol.iterator](): RegExpStringIterator<T>;
3886
+ }
3887
+
3888
+ interface RegExp {
3889
+ /**
3890
+ * Matches a string with this regular expression, and returns an iterable of matches
3891
+ * containing the results of that search.
3892
+ * @param string A string to search within.
3893
+ */
3894
+ [Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>;
3895
+ }
3896
+ // #endregion
3897
+
3898
+ // #region es2020.string TypeScript lib content
3899
+ interface String {
3900
+ /**
3901
+ * Matches a string with a regular expression, and returns an iterable of matches
3902
+ * containing the results of that search.
3903
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
3904
+ */
3905
+ matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
3906
+
3907
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
3908
+ toLocaleLowerCase(locales?: Intl.LocalesArgument): string;
3909
+
3910
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
3911
+ toLocaleUpperCase(locales?: Intl.LocalesArgument): string;
3912
+
3913
+ /**
3914
+ * Determines whether two strings are equivalent in the current or specified locale.
3915
+ * @param that String to compare to target string
3916
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
3917
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
3918
+ */
3919
+ localeCompare(
3920
+ that: string,
3921
+ locales?: Intl.LocalesArgument,
3922
+ options?: Intl.CollatorOptions,
3923
+ ): number;
3924
+ }
3925
+ // #endregion
3926
+
3927
+ // #region es2021.string TypeScript lib content
3928
+ interface String {
3929
+ /**
3930
+ * Replace all instances of a substring in a string, using a regular expression or search string.
3931
+ * @param searchValue A string to search for.
3932
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
3933
+ */
3934
+ replaceAll(searchValue: string | RegExp, replaceValue: string): string;
3935
+
3936
+ /**
3937
+ * Replace all instances of a substring in a string, using a regular expression or search string.
3938
+ * @param searchValue A string to search for.
3939
+ * @param replacer A function that returns the replacement text.
3940
+ */
3941
+ replaceAll(
3942
+ searchValue: string | RegExp,
3943
+ replacer: (substring: string, ...args: any[]) => string,
3944
+ ): string;
3945
+ }
3946
+ // #endregion
3947
+
3948
+ // #region es2022.array TypeScript lib content
3949
+ interface Array<T> {
3950
+ /**
3951
+ * Returns the item located at the specified index.
3952
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3953
+ */
3954
+ at(index: number): T | undefined;
3955
+ }
3956
+
3957
+ interface ReadonlyArray<T> {
3958
+ /**
3959
+ * Returns the item located at the specified index.
3960
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
3961
+ */
3962
+ at(index: number): T | undefined;
3963
+ }
3964
+ // #endregion
3965
+
3966
+ // #region es2022.error TypeScript lib content
3967
+ interface ErrorOptions {
3968
+ cause?: unknown;
3969
+ }
3970
+
3971
+ interface Error {
3972
+ cause?: unknown;
3973
+ }
3974
+
3975
+ interface ErrorConstructor {
3976
+ new (message?: string, options?: ErrorOptions): Error;
3977
+ (message?: string, options?: ErrorOptions): Error;
3978
+ }
3979
+
3980
+ interface EvalErrorConstructor {
3981
+ new (message?: string, options?: ErrorOptions): EvalError;
3982
+ (message?: string, options?: ErrorOptions): EvalError;
3983
+ }
3984
+
3985
+ interface RangeErrorConstructor {
3986
+ new (message?: string, options?: ErrorOptions): RangeError;
3987
+ (message?: string, options?: ErrorOptions): RangeError;
3988
+ }
3989
+
3990
+ interface ReferenceErrorConstructor {
3991
+ new (message?: string, options?: ErrorOptions): ReferenceError;
3992
+ (message?: string, options?: ErrorOptions): ReferenceError;
3993
+ }
3994
+
3995
+ interface SyntaxErrorConstructor {
3996
+ new (message?: string, options?: ErrorOptions): SyntaxError;
3997
+ (message?: string, options?: ErrorOptions): SyntaxError;
3998
+ }
3999
+
4000
+ interface TypeErrorConstructor {
4001
+ new (message?: string, options?: ErrorOptions): TypeError;
4002
+ (message?: string, options?: ErrorOptions): TypeError;
4003
+ }
4004
+
4005
+ interface URIErrorConstructor {
4006
+ new (message?: string, options?: ErrorOptions): URIError;
4007
+ (message?: string, options?: ErrorOptions): URIError;
4008
+ }
4009
+
4010
+ interface AggregateErrorConstructor {
4011
+ new (
4012
+ errors: Iterable<any>,
4013
+ message?: string,
4014
+ options?: ErrorOptions,
4015
+ ): AggregateError;
4016
+ (
4017
+ errors: Iterable<any>,
4018
+ message?: string,
4019
+ options?: ErrorOptions,
4020
+ ): AggregateError;
4021
+ }
4022
+ // #endregion
4023
+
4024
+ // #region es2022.object TypeScript lib content
4025
+ interface ObjectConstructor {
4026
+ /**
4027
+ * Determines whether an object has a property with the specified name.
4028
+ * @param o An object.
4029
+ * @param v A property name.
4030
+ */
4031
+ hasOwn(o: object, v: PropertyKey): boolean;
4032
+ }
4033
+ // #endregion
4034
+
4035
+ // #region es2022.regexp TypeScript lib content
4036
+ interface RegExpMatchArray {
4037
+ indices?: RegExpIndicesArray;
4038
+ }
4039
+
4040
+ interface RegExpExecArray {
4041
+ indices?: RegExpIndicesArray;
4042
+ }
4043
+
4044
+ interface RegExpIndicesArray extends Array<[number, number]> {
4045
+ groups?: {
4046
+ [key: string]: [number, number];
4047
+ };
4048
+ }
4049
+
4050
+ interface RegExp {
4051
+ /**
4052
+ * Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression.
4053
+ * Default is false. Read-only.
4054
+ */
4055
+ readonly hasIndices: boolean;
4056
+ }
4057
+ // #endregion
4058
+
4059
+ // #region es2022.string TypeScript lib content
4060
+ interface String {
4061
+ /**
4062
+ * Returns a new String consisting of the single UTF-16 code unit located at the specified index.
4063
+ * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
4064
+ */
4065
+ at(index: number): string | undefined;
4066
+ }
4067
+ // #endregion