Update for ESLint

This commit is contained in:
Andrew Branch
2019-09-13 08:48:46 -07:00
parent d36155fa3f
commit 047b55fe8e
3 changed files with 6 additions and 6 deletions
+3 -1
View File
@@ -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"
}
+1 -1
View File
@@ -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);
+2 -4
View File
@@ -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;
}