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.
@@ -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;
}
