@@ -105,6 +105,7 @@ namespace ts {
105105 export function createLiteral ( textSource : StringLiteral | Identifier , location ?: TextRange ) : StringLiteral ;
106106 export function createLiteral ( value : string , location ?: TextRange ) : StringLiteral ;
107107 export function createLiteral ( value : number , location ?: TextRange ) : NumericLiteral ;
108+ export function createLiteral ( value : boolean , location ?: TextRange ) : BooleanLiteral ;
108109 export function createLiteral ( value : string | number | boolean , location ?: TextRange ) : PrimaryExpression ;
109110 export function createLiteral ( value : string | number | boolean | StringLiteral | Identifier , location ?: TextRange ) : PrimaryExpression {
110111 if ( typeof value === "number" ) {
@@ -120,7 +121,7 @@ namespace ts {
120121 node . text = value ;
121122 return node ;
122123 }
123- else {
124+ else if ( value ) {
124125 const node = < StringLiteral > createNode ( SyntaxKind . StringLiteral , location , /*flags*/ undefined ) ;
125126 node . textSourceNode = value ;
126127 node . text = value . text ;
@@ -497,14 +498,14 @@ namespace ts {
497498 return node ;
498499 }
499500
500- export function createTaggedTemplate ( tag : Expression , template : Template , location ?: TextRange ) {
501+ export function createTaggedTemplate ( tag : Expression , template : TemplateLiteral , location ?: TextRange ) {
501502 const node = < TaggedTemplateExpression > createNode ( SyntaxKind . TaggedTemplateExpression , location ) ;
502503 node . tag = parenthesizeForAccess ( tag ) ;
503504 node . template = template ;
504505 return node ;
505506 }
506507
507- export function updateTaggedTemplate ( node : TaggedTemplateExpression , tag : Expression , template : Template ) {
508+ export function updateTaggedTemplate ( node : TaggedTemplateExpression , tag : Expression , template : TemplateLiteral ) {
508509 if ( node . tag !== tag || node . template !== template ) {
509510 return updateNode ( createTaggedTemplate ( tag , template , node ) , node ) ;
510511 }
0 commit comments