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

Commit b51a3fe

Browse files
committed
Merge pull request #16 from JamesHenry/issue-15
Fix: SyntaxKind code checks, update TS peerDependency ^1.7.3 (fixes #15)
2 parents e34f6b4 + 091973b commit b51a3fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ast-converter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ function getTokenType(token) {
293293
}
294294
}
295295

296-
if (token.kind >= 68 && token.kind <= 112) {
296+
if (token.kind >= SyntaxKind.FirstKeyword && token.kind <= SyntaxKind.LastFutureReservedWord) {
297297
return "Keyword";
298298
}
299299

300-
if (token.kind >= 15 && token.kind <= 66) {
300+
if (token.kind >= SyntaxKind.FirstPunctuation && token.kind <= SyntaxKind.LastBinaryOperator) {
301301
return "Punctuator";
302302
}
303303

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@
5858
"object-assign": "^4.0.1"
5959
},
6060
"peerDependencies": {
61-
"typescript": "^1.6.2"
61+
"typescript": "^1.7.3"
6262
}
6363
}

0 commit comments

Comments
 (0)