Fix declaration emitted crash on mapped type with no type (#22213)

This commit is contained in:
Wesley Wigham
2018-02-27 16:12:03 -08:00
committed by GitHub
parent dafa7321c6
commit c1128d6957
6 changed files with 48 additions and 1 deletions

View File

@@ -608,7 +608,12 @@ namespace ts {
"?");
}
write(": ");
emitType(node.type);
if (node.type) {
emitType(node.type);
}
else {
write("any");
}
write(";");
writeLine();
decreaseIndent();