Skip to content

Commit 4989ae5

Browse files
author
Andy Hanson
committed
Allow NoSubstitutionTemplateLiteral as argument to createLiteral
1 parent 051c9c8 commit 4989ae5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/factory.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ namespace ts {
7171
// Literals
7272

7373
/** If a node is passed, creates a string literal whose source text is read from a source node during emit. */
74-
export function createLiteral(value: string | StringLiteral | NumericLiteral | Identifier): StringLiteral;
74+
export function createLiteral(value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
7575
export function createLiteral(value: number): NumericLiteral;
7676
export function createLiteral(value: boolean): BooleanLiteral;
7777
export function createLiteral(value: string | number | boolean): PrimaryExpression;
78-
export function createLiteral(value: string | number | boolean | StringLiteral | NumericLiteral | Identifier): PrimaryExpression {
78+
export function createLiteral(value: string | number | boolean | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): PrimaryExpression {
7979
if (typeof value === "number") {
8080
return createNumericLiteral(value + "");
8181
}

0 commit comments

Comments
 (0)