File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ declare module "typescript" {
21
21
pos : number ;
22
22
end : number ;
23
23
}
24
- const enum SyntaxKind {
24
+ enum SyntaxKind {
25
25
Unknown = 0 ,
26
26
EndOfFileToken = 1 ,
27
27
SingleLineCommentTrivia = 2 ,
Original file line number Diff line number Diff line change @@ -322,14 +322,14 @@ export class Project {
322
322
var references = file . ts . referencedFiles . map ( item => path . join ( path . dirname ( Project . getFileName ( file . ts ) ) , Project . getFileName ( item ) ) ) ;
323
323
324
324
this . typescript . forEachChild ( file . ts , ( node ) => {
325
- if ( node . kind === this . typescript . SyntaxKind . ImportDeclaration ) {
325
+ if ( node . kind === ( < any > this . typescript . SyntaxKind ) . ImportDeclaration ) {
326
326
var importNode = < ts . ImportDeclaration > node ;
327
327
328
- if ( importNode . moduleReference === undefined || importNode . moduleReference . kind !== this . typescript . SyntaxKind . ExternalModuleReference ) {
328
+ if ( importNode . moduleReference === undefined || importNode . moduleReference . kind !== ( < any > this . typescript . SyntaxKind ) . ExternalModuleReference ) {
329
329
return ;
330
330
}
331
331
var reference = < ts . ExternalModuleReference > importNode . moduleReference ;
332
- if ( reference . expression === undefined || reference . expression . kind !== this . typescript . SyntaxKind . StringLiteral ) {
332
+ if ( reference . expression === undefined || reference . expression . kind !== ( < any > this . typescript . SyntaxKind ) . StringLiteral ) {
333
333
return ;
334
334
}
335
335
if ( typeof ( < ts . StringLiteralExpression > reference ) . text !== 'string' ) {
Original file line number Diff line number Diff line change @@ -203,13 +203,13 @@ var Project = (function () {
203
203
var _this = this ;
204
204
var references = file . ts . referencedFiles . map ( function ( item ) { return path . join ( path . dirname ( Project . getFileName ( file . ts ) ) , Project . getFileName ( item ) ) ; } ) ;
205
205
this . typescript . forEachChild ( file . ts , function ( node ) {
206
- if ( node . kind === 191 /* ImportDeclaration */ ) {
206
+ if ( node . kind === _this . typescript . SyntaxKind . ImportDeclaration ) {
207
207
var importNode = node ;
208
- if ( importNode . moduleReference === undefined || importNode . moduleReference . kind !== 193 /* ExternalModuleReference */ ) {
208
+ if ( importNode . moduleReference === undefined || importNode . moduleReference . kind !== _this . typescript . SyntaxKind . ExternalModuleReference ) {
209
209
return ;
210
210
}
211
211
var reference = importNode . moduleReference ;
212
- if ( reference . expression === undefined || reference . expression . kind !== 7 /* StringLiteral */ ) {
212
+ if ( reference . expression === undefined || reference . expression . kind !== _this . typescript . SyntaxKind . StringLiteral ) {
213
213
return ;
214
214
}
215
215
if ( typeof reference . text !== 'string' ) {
You can’t perform that action at this time.
0 commit comments