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

Method emitTypeNodePreservingExtends

internal/printer/printer.go:2270–2272  ·  view source on GitHub ↗

emits a Type node preserving whether or not we are currently in the `extends` clause of a ConditionalType or InferType

(node *ast.TypeNode, precedence ast.TypePrecedence)

Source from the content-addressed store, hash-verified

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) {
2271 p.emitTypeNode(node, precedence)
2272}
2273
2274func (p *Printer) emitTypeNode(node *ast.TypeNode, precedence ast.TypePrecedence) {
2275 if p.inExtends && precedence <= ast.TypePrecedenceConditional {

Callers 3

emitReturnTypeMethod · 0.95
emitTypeNodeInExtendsMethod · 0.95

Calls 1

emitTypeNodeMethod · 0.95

Tested by

no test coverage detected