|
| 1 | +// The contents of this string are derived from typescript/lib/lib.es5.d.ts. |
| 2 | +// These types are all that are needed for the NamedExports check to work. |
| 3 | + |
| 4 | +/*! ***************************************************************************** |
| 5 | +Copyright (c) Microsoft Corporation. All rights reserved. |
| 6 | +Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
| 7 | +this file except in compliance with the License. You may obtain a copy of the |
| 8 | +License at http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 11 | +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
| 12 | +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
| 13 | +MERCHANTABLITY OR NON-INFRINGEMENT. |
| 14 | +
|
| 15 | +See the Apache Version 2.0 License for specific language governing permissions |
| 16 | +and limitations under the License. |
| 17 | +***************************************************************************** */ |
| 18 | +export default ` |
| 19 | +interface ReadonlyArray<T> { |
| 20 | + readonly length: number; |
| 21 | + toString(): string; |
| 22 | + toLocaleString(): string; |
| 23 | + concat(...items: ConcatArray<T>[]): T[]; |
| 24 | + concat(...items: (T | ConcatArray<T>)[]): T[]; |
| 25 | + join(separator?: string): string; |
| 26 | + slice(start?: number, end?: number): T[]; |
| 27 | + indexOf(searchElement: T, fromIndex?: number): number; |
| 28 | + lastIndexOf(searchElement: T, fromIndex?: number): number; |
| 29 | + every<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; |
| 30 | + every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; |
| 31 | + some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; |
| 32 | + forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; |
| 33 | + map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; |
| 34 | + filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; |
| 35 | + filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; |
| 36 | + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; |
| 37 | + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; |
| 38 | + reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; |
| 39 | + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; |
| 40 | + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; |
| 41 | + reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; |
| 42 | + readonly [n: number]: T; |
| 43 | +} |
| 44 | +
|
| 45 | +interface Array<T> { |
| 46 | + length: number; |
| 47 | + toString(): string; |
| 48 | + toLocaleString(): string; |
| 49 | + pop(): T | undefined; |
| 50 | + push(...items: T[]): number; |
| 51 | + concat(...items: ConcatArray<T>[]): T[]; |
| 52 | + concat(...items: (T | ConcatArray<T>)[]): T[]; |
| 53 | + join(separator?: string): string; |
| 54 | + reverse(): T[]; |
| 55 | + shift(): T | undefined; |
| 56 | + slice(start?: number, end?: number): T[]; |
| 57 | + sort(compareFn?: (a: T, b: T) => number): this; |
| 58 | + splice(start: number, deleteCount?: number): T[]; |
| 59 | + splice(start: number, deleteCount: number, ...items: T[]): T[]; |
| 60 | + unshift(...items: T[]): number; |
| 61 | + indexOf(searchElement: T, fromIndex?: number): number; |
| 62 | + lastIndexOf(searchElement: T, fromIndex?: number): number; |
| 63 | + every<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; |
| 64 | + every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; |
| 65 | + some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; |
| 66 | + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; |
| 67 | + map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; |
| 68 | + filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; |
| 69 | + filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; |
| 70 | + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; |
| 71 | + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; |
| 72 | + reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; |
| 73 | + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; |
| 74 | + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; |
| 75 | + reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; |
| 76 | + [n: number]: T; |
| 77 | +} |
| 78 | +`; |
0 commit comments