Skip to content
This repository was archived by the owner on Jan 14, 2019. It is now read-only.

Commit c47d66d

Browse files
committed
Add missing type check for getTextForTokenKind
1 parent 247be57 commit c47d66d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const LOGICAL_OPERATORS: ts.LogicalOperator[] = [
3737
SyntaxKind.AmpersandAmpersandToken
3838
];
3939

40-
const TOKEN_TO_TEXT: { readonly [P in keyof typeof SyntaxKind]?: string } = {
40+
const TOKEN_TO_TEXT: { readonly [P in ts.SyntaxKind]?: string } = {
4141
[SyntaxKind.OpenBraceToken]: '{',
4242
[SyntaxKind.CloseBraceToken]: '}',
4343
[SyntaxKind.OpenParenToken]: '(',
@@ -191,7 +191,7 @@ function isLogicalOperator(operator: ts.Token<any>): boolean {
191191
* @param {number} kind the token's SyntaxKind
192192
* @returns {string} the token applicable token as a string
193193
*/
194-
function getTextForTokenKind(kind: number): string | undefined {
194+
function getTextForTokenKind(kind: ts.SyntaxKind): string | undefined {
195195
return TOKEN_TO_TEXT[kind];
196196
}
197197

0 commit comments

Comments
 (0)