mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update for ESLint
This commit is contained in:
Vendored
+3
-1
@@ -9,5 +9,7 @@
|
||||
"rulePaths": ["../scripts/eslint/built/rules/"],
|
||||
"ext": [".ts"]
|
||||
},
|
||||
"eslint.workingDirectories": ["./src", "./scripts"]
|
||||
"eslint.workingDirectories": ["./src", "./scripts"],
|
||||
"typescript.tsserver.log": "normal",
|
||||
"typescript.tsdk": "built/local"
|
||||
}
|
||||
@@ -332,7 +332,7 @@ namespace ts {
|
||||
/**
|
||||
* Like `forEach`, but iterates in reverse order.
|
||||
*/
|
||||
export function forEachRight<T, U>(array: ReadonlyArray<T> | undefined, callback: (element: T, index: number) => U | undefined): U | undefined {
|
||||
export function forEachRight<T, U>(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined {
|
||||
if (array) {
|
||||
for (let i = array.length - 1; i >= 0; i--) {
|
||||
const result = callback(array[i], i);
|
||||
|
||||
@@ -18,12 +18,10 @@ namespace ts {
|
||||
getText(sourceFile?: SourceFile): string;
|
||||
getFirstToken(sourceFile?: SourceFile): Node | undefined;
|
||||
/* @internal */
|
||||
// tslint:disable-next-line unified-signatures
|
||||
getFirstToken(sourceFile?: SourceFileLike): Node | undefined;
|
||||
getFirstToken(sourceFile?: SourceFileLike): Node | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
|
||||
getLastToken(sourceFile?: SourceFile): Node | undefined;
|
||||
/* @internal */
|
||||
// tslint:disable-next-line unified-signatures
|
||||
getLastToken(sourceFile?: SourceFileLike): Node | undefined;
|
||||
getLastToken(sourceFile?: SourceFileLike): Node | undefined; // eslint-disable-line @typescript-eslint/unified-signatures
|
||||
// See ts.forEachChild for documentation.
|
||||
forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user