tsrc 2.1.5.0

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 (57) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +55 -0
  5. data/README.md +33 -0
  6. data/Rakefile +16 -0
  7. data/lib/tsrc.rb +57 -0
  8. data/lib/tsrc/support/typescript/.mailmap +216 -0
  9. data/lib/tsrc/support/typescript/.npmignore +19 -0
  10. data/lib/tsrc/support/typescript/AUTHORS.md +204 -0
  11. data/lib/tsrc/support/typescript/CONTRIBUTING.md +185 -0
  12. data/lib/tsrc/support/typescript/CopyrightNotice.txt +15 -0
  13. data/lib/tsrc/support/typescript/LICENSE.txt +55 -0
  14. data/lib/tsrc/support/typescript/README.md +98 -0
  15. data/lib/tsrc/support/typescript/ThirdPartyNoticeText.txt +35 -0
  16. data/lib/tsrc/support/typescript/bin/tsc +2 -0
  17. data/lib/tsrc/support/typescript/bin/tsserver +2 -0
  18. data/lib/tsrc/support/typescript/lib/README.md +5 -0
  19. data/lib/tsrc/support/typescript/lib/cancellationToken.js +41 -0
  20. data/lib/tsrc/support/typescript/lib/lib.d.ts +18215 -0
  21. data/lib/tsrc/support/typescript/lib/lib.dom.d.ts +13738 -0
  22. data/lib/tsrc/support/typescript/lib/lib.dom.iterable.d.ts +33 -0
  23. data/lib/tsrc/support/typescript/lib/lib.es2015.collection.d.ts +92 -0
  24. data/lib/tsrc/support/typescript/lib/lib.es2015.core.d.ts +544 -0
  25. data/lib/tsrc/support/typescript/lib/lib.es2015.d.ts +30 -0
  26. data/lib/tsrc/support/typescript/lib/lib.es2015.generator.d.ts +32 -0
  27. data/lib/tsrc/support/typescript/lib/lib.es2015.iterable.d.ts +465 -0
  28. data/lib/tsrc/support/typescript/lib/lib.es2015.promise.d.ts +274 -0
  29. data/lib/tsrc/support/typescript/lib/lib.es2015.proxy.d.ts +42 -0
  30. data/lib/tsrc/support/typescript/lib/lib.es2015.reflect.d.ts +35 -0
  31. data/lib/tsrc/support/typescript/lib/lib.es2015.symbol.d.ts +56 -0
  32. data/lib/tsrc/support/typescript/lib/lib.es2015.symbol.wellknown.d.ts +347 -0
  33. data/lib/tsrc/support/typescript/lib/lib.es2016.array.include.d.ts +118 -0
  34. data/lib/tsrc/support/typescript/lib/lib.es2016.d.ts +22 -0
  35. data/lib/tsrc/support/typescript/lib/lib.es2017.d.ts +24 -0
  36. data/lib/tsrc/support/typescript/lib/lib.es2017.object.d.ts +45 -0
  37. data/lib/tsrc/support/typescript/lib/lib.es2017.sharedmemory.d.ts +47 -0
  38. data/lib/tsrc/support/typescript/lib/lib.es2017.string.d.ts +47 -0
  39. data/lib/tsrc/support/typescript/lib/lib.es5.d.ts +4195 -0
  40. data/lib/tsrc/support/typescript/lib/lib.es6.d.ts +19950 -0
  41. data/lib/tsrc/support/typescript/lib/lib.scripthost.d.ts +311 -0
  42. data/lib/tsrc/support/typescript/lib/lib.webworker.d.ts +1274 -0
  43. data/lib/tsrc/support/typescript/lib/protocol.d.ts +1900 -0
  44. data/lib/tsrc/support/typescript/lib/tsc.js +52470 -0
  45. data/lib/tsrc/support/typescript/lib/tsserver.js +70720 -0
  46. data/lib/tsrc/support/typescript/lib/tsserverlibrary.d.ts +11939 -0
  47. data/lib/tsrc/support/typescript/lib/tsserverlibrary.js +70256 -0
  48. data/lib/tsrc/support/typescript/lib/typescript.d.ts +3166 -0
  49. data/lib/tsrc/support/typescript/lib/typescript.js +81536 -0
  50. data/lib/tsrc/support/typescript/lib/typescriptServices.d.ts +3164 -0
  51. data/lib/tsrc/support/typescript/lib/typescriptServices.js +81536 -0
  52. data/lib/tsrc/support/typescript/lib/typingsInstaller.js +7314 -0
  53. data/lib/tsrc/support/typescript/package.json +129 -0
  54. data/lib/tsrc/support/typescript/test.config +1 -0
  55. data/lib/tsrc/version.rb +5 -0
  56. data/tsrc.gemspec +20 -0
  57. metadata +113 -0
@@ -0,0 +1,33 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+
18
+ /// <reference no-default-lib="true"/>
19
+
20
+
21
+ /// <reference path="lib.dom.d.ts" />
22
+
23
+ interface DOMTokenList {
24
+ [Symbol.iterator](): IterableIterator<string>;
25
+ }
26
+
27
+ interface NodeList {
28
+ [Symbol.iterator](): IterableIterator<Node>
29
+ }
30
+
31
+ interface NodeListOf<TNode extends Node> {
32
+ [Symbol.iterator](): IterableIterator<TNode>
33
+ }
@@ -0,0 +1,92 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+
18
+ /// <reference no-default-lib="true"/>
19
+
20
+
21
+ interface Map<K, V> {
22
+ clear(): void;
23
+ delete(key: K): boolean;
24
+ forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
25
+ get(key: K): V | undefined;
26
+ has(key: K): boolean;
27
+ set(key: K, value?: V): this;
28
+ readonly size: number;
29
+ }
30
+
31
+ interface MapConstructor {
32
+ new (): Map<any, any>;
33
+ new <K, V>(entries?: [K, V][]): Map<K, V>;
34
+ readonly prototype: Map<any, any>;
35
+ }
36
+ declare var Map: MapConstructor;
37
+
38
+ interface ReadonlyMap<K, V> {
39
+ forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
40
+ get(key: K): V|undefined;
41
+ has(key: K): boolean;
42
+ readonly size: number;
43
+ }
44
+
45
+ interface WeakMap<K, V> {
46
+ delete(key: K): boolean;
47
+ get(key: K): V | undefined;
48
+ has(key: K): boolean;
49
+ set(key: K, value?: V): this;
50
+ }
51
+
52
+ interface WeakMapConstructor {
53
+ new (): WeakMap<any, any>;
54
+ new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
55
+ readonly prototype: WeakMap<any, any>;
56
+ }
57
+ declare var WeakMap: WeakMapConstructor;
58
+
59
+ interface Set<T> {
60
+ add(value: T): this;
61
+ clear(): void;
62
+ delete(value: T): boolean;
63
+ forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
64
+ has(value: T): boolean;
65
+ readonly size: number;
66
+ }
67
+
68
+ interface SetConstructor {
69
+ new (): Set<any>;
70
+ new <T>(values?: T[]): Set<T>;
71
+ readonly prototype: Set<any>;
72
+ }
73
+ declare var Set: SetConstructor;
74
+
75
+ interface ReadonlySet<T> {
76
+ forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
77
+ has(value: T): boolean;
78
+ readonly size: number;
79
+ }
80
+
81
+ interface WeakSet<T> {
82
+ add(value: T): this;
83
+ delete(value: T): boolean;
84
+ has(value: T): boolean;
85
+ }
86
+
87
+ interface WeakSetConstructor {
88
+ new (): WeakSet<any>;
89
+ new <T>(values?: T[]): WeakSet<T>;
90
+ readonly prototype: WeakSet<any>;
91
+ }
92
+ declare var WeakSet: WeakSetConstructor;
@@ -0,0 +1,544 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+
18
+ /// <reference no-default-lib="true"/>
19
+
20
+
21
+ declare type PropertyKey = string | number | symbol;
22
+
23
+ interface Array<T> {
24
+ /**
25
+ * Returns the value of the first element in the array where predicate is true, and undefined
26
+ * otherwise.
27
+ * @param predicate find calls predicate once for each element of the array, in ascending
28
+ * order, until it finds one where predicate returns true. If such an element is found, find
29
+ * immediately returns that element value. Otherwise, find returns undefined.
30
+ * @param thisArg If provided, it will be used as the this value for each invocation of
31
+ * predicate. If it is not provided, undefined is used instead.
32
+ */
33
+ find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T | undefined;
34
+
35
+ /**
36
+ * Returns the index of the first element in the array where predicate is true, and -1
37
+ * otherwise.
38
+ * @param predicate find calls predicate once for each element of the array, in ascending
39
+ * order, until it finds one where predicate returns true. If such an element is found,
40
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
41
+ * @param thisArg If provided, it will be used as the this value for each invocation of
42
+ * predicate. If it is not provided, undefined is used instead.
43
+ */
44
+ findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): number;
45
+
46
+ /**
47
+ * Returns the this object after filling the section identified by start and end with value
48
+ * @param value value to fill array section with
49
+ * @param start index to start filling the array at. If start is negative, it is treated as
50
+ * length+start where length is the length of the array.
51
+ * @param end index to stop filling the array at. If end is negative, it is treated as
52
+ * length+end.
53
+ */
54
+ fill(value: T, start?: number, end?: number): this;
55
+
56
+ /**
57
+ * Returns the this object after copying a section of the array identified by start and end
58
+ * to the same array starting at position target
59
+ * @param target If target is negative, it is treated as length+target where length is the
60
+ * length of the array.
61
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
62
+ * is treated as length+end.
63
+ * @param end If not specified, length of the this object is used as its default value.
64
+ */
65
+ copyWithin(target: number, start: number, end?: number): this;
66
+ }
67
+
68
+ interface ArrayConstructor {
69
+ /**
70
+ * Creates an array from an array-like object.
71
+ * @param arrayLike An array-like object to convert to an array.
72
+ * @param mapfn A mapping function to call on every element of the array.
73
+ * @param thisArg Value of 'this' used to invoke the mapfn.
74
+ */
75
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
76
+
77
+
78
+ /**
79
+ * Creates an array from an array-like object.
80
+ * @param arrayLike An array-like object to convert to an array.
81
+ */
82
+ from<T>(arrayLike: ArrayLike<T>): Array<T>;
83
+
84
+ /**
85
+ * Returns a new array from a set of elements.
86
+ * @param items A set of elements to include in the new array object.
87
+ */
88
+ of<T>(...items: T[]): Array<T>;
89
+ }
90
+
91
+ interface DateConstructor {
92
+ new (value: Date): Date;
93
+ }
94
+
95
+ interface Function {
96
+ /**
97
+ * Returns the name of the function. Function names are read-only and can not be changed.
98
+ */
99
+ readonly name: string;
100
+ }
101
+
102
+ interface Math {
103
+ /**
104
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
105
+ * @param x A numeric expression.
106
+ */
107
+ clz32(x: number): number;
108
+
109
+ /**
110
+ * Returns the result of 32-bit multiplication of two numbers.
111
+ * @param x First number
112
+ * @param y Second number
113
+ */
114
+ imul(x: number, y: number): number;
115
+
116
+ /**
117
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
118
+ * @param x The numeric expression to test
119
+ */
120
+ sign(x: number): number;
121
+
122
+ /**
123
+ * Returns the base 10 logarithm of a number.
124
+ * @param x A numeric expression.
125
+ */
126
+ log10(x: number): number;
127
+
128
+ /**
129
+ * Returns the base 2 logarithm of a number.
130
+ * @param x A numeric expression.
131
+ */
132
+ log2(x: number): number;
133
+
134
+ /**
135
+ * Returns the natural logarithm of 1 + x.
136
+ * @param x A numeric expression.
137
+ */
138
+ log1p(x: number): number;
139
+
140
+ /**
141
+ * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
142
+ * the natural logarithms).
143
+ * @param x A numeric expression.
144
+ */
145
+ expm1(x: number): number;
146
+
147
+ /**
148
+ * Returns the hyperbolic cosine of a number.
149
+ * @param x A numeric expression that contains an angle measured in radians.
150
+ */
151
+ cosh(x: number): number;
152
+
153
+ /**
154
+ * Returns the hyperbolic sine of a number.
155
+ * @param x A numeric expression that contains an angle measured in radians.
156
+ */
157
+ sinh(x: number): number;
158
+
159
+ /**
160
+ * Returns the hyperbolic tangent of a number.
161
+ * @param x A numeric expression that contains an angle measured in radians.
162
+ */
163
+ tanh(x: number): number;
164
+
165
+ /**
166
+ * Returns the inverse hyperbolic cosine of a number.
167
+ * @param x A numeric expression that contains an angle measured in radians.
168
+ */
169
+ acosh(x: number): number;
170
+
171
+ /**
172
+ * Returns the inverse hyperbolic sine of a number.
173
+ * @param x A numeric expression that contains an angle measured in radians.
174
+ */
175
+ asinh(x: number): number;
176
+
177
+ /**
178
+ * Returns the inverse hyperbolic tangent of a number.
179
+ * @param x A numeric expression that contains an angle measured in radians.
180
+ */
181
+ atanh(x: number): number;
182
+
183
+ /**
184
+ * Returns the square root of the sum of squares of its arguments.
185
+ * @param values Values to compute the square root for.
186
+ * If no arguments are passed, the result is +0.
187
+ * If there is only one argument, the result is the absolute value.
188
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
189
+ * If any argument is NaN, the result is NaN.
190
+ * If all arguments are either +0 or −0, the result is +0.
191
+ */
192
+ hypot(...values: number[] ): number;
193
+
194
+ /**
195
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
196
+ * If x is already an integer, the result is x.
197
+ * @param x A numeric expression.
198
+ */
199
+ trunc(x: number): number;
200
+
201
+ /**
202
+ * Returns the nearest single precision float representation of a number.
203
+ * @param x A numeric expression.
204
+ */
205
+ fround(x: number): number;
206
+
207
+ /**
208
+ * Returns an implementation-dependent approximation to the cube root of number.
209
+ * @param x A numeric expression.
210
+ */
211
+ cbrt(x: number): number;
212
+ }
213
+
214
+ interface NumberConstructor {
215
+ /**
216
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
217
+ * that is representable as a Number value, which is approximately:
218
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
219
+ */
220
+ readonly EPSILON: number;
221
+
222
+ /**
223
+ * Returns true if passed value is finite.
224
+ * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
225
+ * number. Only finite values of the type number, result in true.
226
+ * @param number A numeric value.
227
+ */
228
+ isFinite(number: number): boolean;
229
+
230
+ /**
231
+ * Returns true if the value passed is an integer, false otherwise.
232
+ * @param number A numeric value.
233
+ */
234
+ isInteger(number: number): boolean;
235
+
236
+ /**
237
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
238
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
239
+ * to a number. Only values of the type number, that are also NaN, result in true.
240
+ * @param number A numeric value.
241
+ */
242
+ isNaN(number: number): boolean;
243
+
244
+ /**
245
+ * Returns true if the value passed is a safe integer.
246
+ * @param number A numeric value.
247
+ */
248
+ isSafeInteger(number: number): boolean;
249
+
250
+ /**
251
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
252
+ * a Number value.
253
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
254
+ */
255
+ readonly MAX_SAFE_INTEGER: number;
256
+
257
+ /**
258
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
259
+ * a Number value.
260
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
261
+ */
262
+ readonly MIN_SAFE_INTEGER: number;
263
+
264
+ /**
265
+ * Converts a string to a floating-point number.
266
+ * @param string A string that contains a floating-point number.
267
+ */
268
+ parseFloat(string: string): number;
269
+
270
+ /**
271
+ * Converts A string to an integer.
272
+ * @param s A string to convert into a number.
273
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
274
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
275
+ * All other strings are considered decimal.
276
+ */
277
+ parseInt(string: string, radix?: number): number;
278
+ }
279
+
280
+ interface Object {
281
+ /**
282
+ * Determines whether an object has a property with the specified name.
283
+ * @param v A property name.
284
+ */
285
+ hasOwnProperty(v: PropertyKey): boolean
286
+
287
+ /**
288
+ * Determines whether a specified property is enumerable.
289
+ * @param v A property name.
290
+ */
291
+ propertyIsEnumerable(v: PropertyKey): boolean;
292
+ }
293
+
294
+ interface ObjectConstructor {
295
+ /**
296
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
297
+ * target object. Returns the target object.
298
+ * @param target The target object to copy to.
299
+ * @param source The source object from which to copy properties.
300
+ */
301
+ assign<T, U>(target: T, source: U): T & U;
302
+
303
+ /**
304
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
305
+ * target object. Returns the target object.
306
+ * @param target The target object to copy to.
307
+ * @param source1 The first source object from which to copy properties.
308
+ * @param source2 The second source object from which to copy properties.
309
+ */
310
+ assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
311
+
312
+ /**
313
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
314
+ * target object. Returns the target object.
315
+ * @param target The target object to copy to.
316
+ * @param source1 The first source object from which to copy properties.
317
+ * @param source2 The second source object from which to copy properties.
318
+ * @param source3 The third source object from which to copy properties.
319
+ */
320
+ assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
321
+
322
+ /**
323
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
324
+ * target object. Returns the target object.
325
+ * @param target The target object to copy to.
326
+ * @param sources One or more source objects from which to copy properties
327
+ */
328
+ assign(target: any, ...sources: any[]): any;
329
+
330
+ /**
331
+ * Returns an array of all symbol properties found directly on object o.
332
+ * @param o Object to retrieve the symbols from.
333
+ */
334
+ getOwnPropertySymbols(o: any): symbol[];
335
+
336
+ /**
337
+ * Returns true if the values are the same value, false otherwise.
338
+ * @param value1 The first value.
339
+ * @param value2 The second value.
340
+ */
341
+ is(value1: any, value2: any): boolean;
342
+
343
+ /**
344
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
345
+ * @param o The object to change its prototype.
346
+ * @param proto The value of the new prototype or null.
347
+ */
348
+ setPrototypeOf(o: any, proto: any): any;
349
+
350
+ /**
351
+ * Gets the own property descriptor of the specified object.
352
+ * An own property descriptor is one that is defined directly on the object and is not
353
+ * inherited from the object's prototype.
354
+ * @param o Object that contains the property.
355
+ * @param p Name of the property.
356
+ */
357
+ getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
358
+
359
+ /**
360
+ * Adds a property to an object, or modifies attributes of an existing property.
361
+ * @param o Object on which to add or modify the property. This can be a native JavaScript
362
+ * object (that is, a user-defined object or a built in object) or a DOM object.
363
+ * @param p The property name.
364
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor
365
+ * property.
366
+ */
367
+ defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
368
+ }
369
+
370
+ interface ReadonlyArray<T> {
371
+ /**
372
+ * Returns the value of the first element in the array where predicate is true, and undefined
373
+ * otherwise.
374
+ * @param predicate find calls predicate once for each element of the array, in ascending
375
+ * order, until it finds one where predicate returns true. If such an element is found, find
376
+ * immediately returns that element value. Otherwise, find returns undefined.
377
+ * @param thisArg If provided, it will be used as the this value for each invocation of
378
+ * predicate. If it is not provided, undefined is used instead.
379
+ */
380
+ find(predicate: (value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg?: any): T | undefined;
381
+
382
+ /**
383
+ * Returns the index of the first element in the array where predicate is true, and -1
384
+ * otherwise.
385
+ * @param predicate find calls predicate once for each element of the array, in ascending
386
+ * order, until it finds one where predicate returns true. If such an element is found,
387
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
388
+ * @param thisArg If provided, it will be used as the this value for each invocation of
389
+ * predicate. If it is not provided, undefined is used instead.
390
+ */
391
+ findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): number;
392
+ }
393
+
394
+ interface RegExp {
395
+ /**
396
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
397
+ * The characters in this string are sequenced and concatenated in the following order:
398
+ *
399
+ * - "g" for global
400
+ * - "i" for ignoreCase
401
+ * - "m" for multiline
402
+ * - "u" for unicode
403
+ * - "y" for sticky
404
+ *
405
+ * If no flags are set, the value is the empty string.
406
+ */
407
+ readonly flags: string;
408
+
409
+ /**
410
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
411
+ * expression. Default is false. Read-only.
412
+ */
413
+ readonly sticky: boolean;
414
+
415
+ /**
416
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
417
+ * expression. Default is false. Read-only.
418
+ */
419
+ readonly unicode: boolean;
420
+ }
421
+
422
+ interface RegExpConstructor {
423
+ new (pattern: RegExp, flags?: string): RegExp;
424
+ (pattern: RegExp, flags?: string): RegExp;
425
+ }
426
+
427
+ interface String {
428
+ /**
429
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
430
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
431
+ * the String resulting from converting this object to a String.
432
+ * If there is no element at that position, the result is undefined.
433
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
434
+ */
435
+ codePointAt(pos: number): number | undefined;
436
+
437
+ /**
438
+ * Returns true if searchString appears as a substring of the result of converting this
439
+ * object to a String, at one or more positions that are
440
+ * greater than or equal to position; otherwise, returns false.
441
+ * @param searchString search string
442
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
443
+ */
444
+ includes(searchString: string, position?: number): boolean;
445
+
446
+ /**
447
+ * Returns true if the sequence of elements of searchString converted to a String is the
448
+ * same as the corresponding elements of this object (converted to a String) starting at
449
+ * endPosition – length(this). Otherwise returns false.
450
+ */
451
+ endsWith(searchString: string, endPosition?: number): boolean;
452
+
453
+ /**
454
+ * Returns the String value result of normalizing the string into the normalization form
455
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
456
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
457
+ * is "NFC"
458
+ */
459
+ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
460
+
461
+ /**
462
+ * Returns the String value result of normalizing the string into the normalization form
463
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
464
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
465
+ * is "NFC"
466
+ */
467
+ normalize(form?: string): string;
468
+
469
+ /**
470
+ * Returns a String value that is made from count copies appended together. If count is 0,
471
+ * T is the empty String is returned.
472
+ * @param count number of copies to append
473
+ */
474
+ repeat(count: number): string;
475
+
476
+ /**
477
+ * Returns true if the sequence of elements of searchString converted to a String is the
478
+ * same as the corresponding elements of this object (converted to a String) starting at
479
+ * position. Otherwise returns false.
480
+ */
481
+ startsWith(searchString: string, position?: number): boolean;
482
+
483
+ /**
484
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
485
+ * @param name
486
+ */
487
+ anchor(name: string): string;
488
+
489
+ /** Returns a <big> HTML element */
490
+ big(): string;
491
+
492
+ /** Returns a <blink> HTML element */
493
+ blink(): string;
494
+
495
+ /** Returns a <b> HTML element */
496
+ bold(): string;
497
+
498
+ /** Returns a <tt> HTML element */
499
+ fixed(): string
500
+
501
+ /** Returns a <font> HTML element and sets the color attribute value */
502
+ fontcolor(color: string): string
503
+
504
+ /** Returns a <font> HTML element and sets the size attribute value */
505
+ fontsize(size: number): string;
506
+
507
+ /** Returns a <font> HTML element and sets the size attribute value */
508
+ fontsize(size: string): string;
509
+
510
+ /** Returns an <i> HTML element */
511
+ italics(): string;
512
+
513
+ /** Returns an <a> HTML element and sets the href attribute value */
514
+ link(url: string): string;
515
+
516
+ /** Returns a <small> HTML element */
517
+ small(): string;
518
+
519
+ /** Returns a <strike> HTML element */
520
+ strike(): string;
521
+
522
+ /** Returns a <sub> HTML element */
523
+ sub(): string;
524
+
525
+ /** Returns a <sup> HTML element */
526
+ sup(): string;
527
+ }
528
+
529
+ interface StringConstructor {
530
+ /**
531
+ * Return the String value whose elements are, in order, the elements in the List elements.
532
+ * If length is 0, the empty string is returned.
533
+ */
534
+ fromCodePoint(...codePoints: number[]): string;
535
+
536
+ /**
537
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
538
+ * as such the first argument will be a well formed template call site object and the rest
539
+ * parameter will contain the substitution values.
540
+ * @param template A well-formed template string call site representation.
541
+ * @param substitutions A set of substitution values.
542
+ */
543
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
544
+ }