mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 05:41:22 -06:00
Properly classify output text in emitter
This commit is contained in:
parent
04260d664a
commit
4ae8445ff7
@ -1196,16 +1196,23 @@ namespace ts {
|
||||
|
||||
function emitConditionalType(node: ConditionalTypeNode) {
|
||||
emit(node.checkType);
|
||||
write(" extends ");
|
||||
writeSpace();
|
||||
writeKeyword("extends");
|
||||
writeSpace();
|
||||
emit(node.extendsType);
|
||||
write(" ? ");
|
||||
writeSpace();
|
||||
writePunctuation("?");
|
||||
writeSpace();
|
||||
emit(node.trueType);
|
||||
write(" : ");
|
||||
writeSpace();
|
||||
writePunctuation(":");
|
||||
writeSpace();
|
||||
emit(node.falseType);
|
||||
}
|
||||
|
||||
function emitInferType(node: InferTypeNode) {
|
||||
write("infer ");
|
||||
writeKeyword("infer");
|
||||
writeSpace();
|
||||
emit(node.typeParameter);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user