Also erase TypeLiterals
This change erases TypeLiterals to ObjectLiterals, for much the same reason. Also for much the same reason, it'd be nice to eventually preserve these.
This commit is contained in:
parent
a7f23fc65a
commit
10f5d43245
1 changed files with 2 additions and 2 deletions
|
@ -629,8 +629,8 @@ export class Transformer {
|
|||
return undefined; // void is represented as the absence of a type.
|
||||
}
|
||||
else if (simple.symbol) {
|
||||
if (simple.symbol.flags & ts.SymbolFlags.ObjectLiteral) {
|
||||
// For object literals, simply return the dynamic type.
|
||||
if (simple.symbol.flags & (ts.SymbolFlags.ObjectLiteral | ts.SymbolFlags.TypeLiteral)) {
|
||||
// For object and type literals, simply return the dynamic type.
|
||||
// TODO: consider emitting strong types for these and using them anonymously.
|
||||
return tokens.dynamicType;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue