Skip to content

Commit ea613fd

Browse files
Replaced ES5 functions with analogous core.ts ones.
1 parent 50d0cdc commit ea613fd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/services/services.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,7 @@ module ts {
22192219
pushKeyword(keywords, switchStatement.getFirstToken(), SyntaxKind.SwitchKeyword);
22202220

22212221
// Go through each clause in the switch statement, collecting the clause keywords.
2222-
switchStatement.clauses.forEach(clause => {
2222+
forEach(switchStatement.clauses, clause => {
22232223
pushKeyword(keywords, clause.getFirstToken(), [SyntaxKind.CaseKeyword, SyntaxKind.DefaultKeyword]);
22242224

22252225
// For each clause, also recursively traverse the statements where we can find analogous breaks.
@@ -2294,8 +2294,7 @@ module ts {
22942294
return;
22952295
}
22962296

2297-
if (token.kind === expected ||
2298-
(expected.length && (<SyntaxKind[]>expected).some(expectedKind => expectedKind === token.kind))) {
2297+
if (token.kind === expected || (expected.length && contains(<SyntaxKind[]>expected, token.kind))) {
22992298
keywordList.push(token);
23002299
}
23012300
else {
@@ -2304,7 +2303,7 @@ module ts {
23042303
}
23052304

23062305
function keywordsToReferenceEntries(keywords: Node[]): ReferenceEntry[]{
2307-
return keywords.map(keyword =>
2306+
return map(keywords, keyword =>
23082307
new ReferenceEntry(filename, TypeScript.TextSpan.fromBounds(keyword.getStart(), keyword.end), /* isWriteAccess */ false)
23092308
);
23102309
}

0 commit comments

Comments
 (0)