MCPcopy Index your code
hub / github.com/microsoft/typescript-go / emitTypeNodeOutsideExtends

Method emitTypeNodeOutsideExtends

internal/printer/printer.go:2262–2267  ·  view source on GitHub ↗

emits a Type node not in the `extends` clause of a ConditionalType or InferType

(node *ast.TypeNode)

Source from the content-addressed store, hash-verified

2260
2261// emits a Type node not in the `extends` clause of a ConditionalType or InferType
2262func (p *Printer) emitTypeNodeOutsideExtends(node *ast.TypeNode) {
2263 savedInExtends := p.inExtends
2264 p.inExtends = false
2265 p.emitTypeNodePreservingExtends(node, ast.TypePrecedenceLowest)
2266 p.inExtends = savedInExtends
2267}
2268
2269// emits a Type node preserving whether or not we are currently in the `extends` clause of a ConditionalType or InferType
2270func (p *Printer) emitTypeNodePreservingExtends(node *ast.TypeNode, precedence ast.TypePrecedence) {

Callers 15

emitTypeParameterMethod · 0.95
emitTypeAnnotationMethod · 0.95
emitTypePredicateMethod · 0.95
emitTypeArgumentMethod · 0.95
emitTupleElementTypeMethod · 0.95
emitRestTypeMethod · 0.95
emitNamedTupleMemberMethod · 0.95
emitConditionalTypeMethod · 0.95
emitParenthesizedTypeMethod · 0.95
emitIndexedAccessTypeMethod · 0.95
emitMappedTypeMethod · 0.95

Calls 1

Tested by

no test coverage detected