Skip to content

Commit 4ca24bf

Browse files
committed
Use ts.indexOf instead of Array.prototype.indexOf
(keep consistent with the rest of codebase, and thus enable ES3-compatibility of tsc and services)
1 parent efbacb9 commit 4ca24bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/services/formatting/tokenRange.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ts.formatting {
1414
constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]) {
1515
this.tokens = [];
1616
for (let token = from; token <= to; token++) {
17-
if (except.indexOf(token) < 0) {
17+
if (ts.indexOf(except, token) < 0) {
1818
this.tokens.push(token);
1919
}
2020
}
@@ -123,4 +123,4 @@ namespace ts.formatting {
123123
static TypeNames = TokenRange.FromTokens([SyntaxKind.Identifier, SyntaxKind.NumberKeyword, SyntaxKind.StringKeyword, SyntaxKind.BooleanKeyword, SyntaxKind.SymbolKeyword, SyntaxKind.VoidKeyword, SyntaxKind.AnyKeyword]);
124124
}
125125
}
126-
}
126+
}

0 commit comments

Comments
 (0)