@@ -229,7 +229,8 @@ export class Transpiler {
229
229
}
230
230
231
231
hasAnnotation ( decorators : ts . NodeArray < ts . Decorator > , name : string ) : boolean {
232
- return decorators && decorators . some ( ( d ) => {
232
+ if ( ! decorators ) return false ;
233
+ return decorators . some ( ( d ) => {
233
234
var decName = Transpiler . ident ( d . expression ) ;
234
235
if ( decName === name ) return true ;
235
236
if ( d . expression . kind !== ts . SyntaxKind . CallExpression ) return false ;
@@ -327,7 +328,7 @@ export class Transpiler {
327
328
isEmptyImport ( n : ts . ImportDeclaration ) : boolean {
328
329
var bindings = n . importClause . namedBindings ;
329
330
if ( bindings . kind != ts . SyntaxKind . NamedImports ) return false ;
330
- return ( < ts . NamedImports > bindings ) . elements . every ( Transpiler . isIgnoredAnnotation ) ;
331
+ return ( < ts . NamedImports > bindings ) . elements . every ( Transpiler . isIgnoredAnnotation ) ;
331
332
}
332
333
333
334
filterImports ( ns : ts . ImportOrExportSpecifier [ ] ) {
@@ -423,7 +424,7 @@ export class Transpiler {
423
424
}
424
425
this . emit ( ')' ) ;
425
426
}
426
- if ( isConstCtor ) {
427
+ if ( isConstCtor ) {
427
428
// Const ctors don't have bodies.
428
429
this . emit ( ';' ) ;
429
430
} else {
@@ -754,7 +755,8 @@ export class Transpiler {
754
755
this . emit ( `'''${ this . escapeTextForTemplateString ( node ) } ` ) ; //highlighting bug:'
755
756
break ;
756
757
case ts . SyntaxKind . TemplateTail :
757
- this . result += `${ this . escapeTextForTemplateString ( node ) } '''` ; //highlighting bug:'
758
+ this . result += this . escapeTextForTemplateString ( node ) ;
759
+ this . result += `'''` ;
758
760
break ;
759
761
case ts . SyntaxKind . TemplateSpan :
760
762
var span = < ts . TemplateSpan > node ;
0 commit comments