Skip to content

Commit

Permalink
fix(app): union type and literaltypenode
Browse files Browse the repository at this point in the history
  • Loading branch information
vogloblinsky committed Jul 14, 2021
1 parent 47fe06d commit 4a6ad03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/compiler/angular/deps/helpers/class-helper.ts
Expand Up @@ -915,7 +915,11 @@ export class ClassHelper {
let type = node.types[i];
_return += kindToType(type.kind);
if (ts.isLiteralTypeNode(type) && type.literal) {
_return += '"' + type.literal.text + '"';
if (type.literal.text) {
_return += '"' + type.literal.text + '"';
} else {
_return += kindToType(type.literal.kind);
}
}
if (type.typeName) {
_return += this.visitTypeName(type.typeName);
Expand Down

0 comments on commit 4a6ad03

Please sign in to comment.