-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from arethetypeswrong/bug/named-exports-array
Exclude array/tuple properties from expected named exports
- Loading branch information
Showing
6 changed files
with
998 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@arethetypeswrong/core": patch | ||
--- | ||
|
||
Exclude array/tuple properties from expected named exports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// The contents of this string are derived from typescript/lib/lib.es5.d.ts. | ||
// These types are all that are needed for the NamedExports check to work. | ||
|
||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
export default ` | ||
interface ReadonlyArray<T> { | ||
readonly length: number; | ||
toString(): string; | ||
toLocaleString(): string; | ||
concat(...items: ConcatArray<T>[]): T[]; | ||
concat(...items: (T | ConcatArray<T>)[]): T[]; | ||
join(separator?: string): string; | ||
slice(start?: number, end?: number): T[]; | ||
indexOf(searchElement: T, fromIndex?: number): number; | ||
lastIndexOf(searchElement: T, fromIndex?: number): number; | ||
every<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[]; | ||
every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; | ||
some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean; | ||
forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void; | ||
map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]; | ||
filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]; | ||
filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]; | ||
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; | ||
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; | ||
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; | ||
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; | ||
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; | ||
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U; | ||
readonly [n: number]: T; | ||
} | ||
interface Array<T> { | ||
length: number; | ||
toString(): string; | ||
toLocaleString(): string; | ||
pop(): T | undefined; | ||
push(...items: T[]): number; | ||
concat(...items: ConcatArray<T>[]): T[]; | ||
concat(...items: (T | ConcatArray<T>)[]): T[]; | ||
join(separator?: string): string; | ||
reverse(): T[]; | ||
shift(): T | undefined; | ||
slice(start?: number, end?: number): T[]; | ||
sort(compareFn?: (a: T, b: T) => number): this; | ||
splice(start: number, deleteCount?: number): T[]; | ||
splice(start: number, deleteCount: number, ...items: T[]): T[]; | ||
unshift(...items: T[]): number; | ||
indexOf(searchElement: T, fromIndex?: number): number; | ||
lastIndexOf(searchElement: T, fromIndex?: number): number; | ||
every<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; | ||
every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; | ||
some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; | ||
forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; | ||
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; | ||
filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; | ||
filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; | ||
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; | ||
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; | ||
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; | ||
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; | ||
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; | ||
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; | ||
[n: number]: T; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.