MCPcopy Index your code
hub / github.com/nodejs/node / emitConditionalType

Function emitConditionalType

test/fixtures/snapshot/typescript.js:112000–112014  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

111998 emitList(node, node.types, 520 /* ListFormat.IntersectionTypeConstituents */, parenthesizer.parenthesizeConstituentTypeOfIntersectionType);
111999 }
112000 function emitConditionalType(node) {
112001 emit(node.checkType, parenthesizer.parenthesizeCheckTypeOfConditionalType);
112002 writeSpace();
112003 writeKeyword("extends");
112004 writeSpace();
112005 emit(node.extendsType, parenthesizer.parenthesizeExtendsTypeOfConditionalType);
112006 writeSpace();
112007 writePunctuation("?");
112008 writeSpace();
112009 emit(node.trueType);
112010 writeSpace();
112011 writePunctuation(":");
112012 writeSpace();
112013 emit(node.falseType);
112014 }
112015 function emitInferType(node) {
112016 writeKeyword("infer");
112017 writeSpace();

Callers 1

Calls 4

writeSpaceFunction · 0.85
writeKeywordFunction · 0.85
writePunctuationFunction · 0.85
emitFunction · 0.70

Tested by

no test coverage detected