Fix crash in decorator metadata calculation when serializing template literal type nodes (#39481)

This commit is contained in:
Wesley Wigham
2020-07-07 15:29:52 -07:00
committed by GitHub
parent 62b4377acf
commit 4f375552b5
5 changed files with 68 additions and 0 deletions

View File

@@ -1531,6 +1531,7 @@ namespace ts {
case SyntaxKind.LiteralType:
switch ((<LiteralTypeNode>node).literal.kind) {
case SyntaxKind.StringLiteral:
case SyntaxKind.NoSubstitutionTemplateLiteral:
return factory.createIdentifier("String");
case SyntaxKind.PrefixUnaryExpression: