8000 remove duplicated type -- remove TriviaKind, keep TriviaSyntaxKind. (… · typescript-bot/TypeScript@b9ac2f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9ac2f5

Browse files
authored
remove duplicated type -- remove TriviaKind, keep TriviaSyntaxKind. (microsoft#42108)
1 parent 1635b32 commit b9ac2f5

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/compiler/utilities.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,14 +3065,7 @@ namespace ts {
30653065
return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind);
30663066
}
30673067

3068-
export type TriviaKind =
3069-
SyntaxKind.SingleLineCommentTrivia
3070-
| SyntaxKind.MultiLineCommentTrivia
3071-
| SyntaxKind.NewLineTrivia
3072-
| SyntaxKind.WhitespaceTrivia
3073-
| SyntaxKind.ShebangTrivia
3074-
| SyntaxKind.ConflictMarkerTrivia;
3075-
export function isTrivia(token: SyntaxKind): token is TriviaKind {
3068+
export function isTrivia(token: SyntaxKind): token is TriviaSyntaxKind {
30763069
return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken;
30773070
}
30783071

src/services/formatting/formatting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace ts.formatting {
1010
kind: T;
1111
}
1212

13-
export type TextRangeWithTriviaKind = TextRangeWithKind<TriviaKind>;
13+
export type TextRangeWithTriviaKind = TextRangeWithKind<TriviaSyntaxKind>;
1414

1515
export interface TokenInfo {
1616
leadingTrivia: TextRangeWithTriviaKind[] | undefined;

0 commit comments

Comments
 (0)
0