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

Method emitTypeParameters

internal/printer/printer.go:1502–1507  ·  view source on GitHub ↗
(parentNode *ast.Node, nodes *ast.TypeParameterList)

Source from the content-addressed store, hash-verified

1500}
1501
1502func (p *Printer) emitTypeParameters(parentNode *ast.Node, nodes *ast.TypeParameterList) {
1503 if nodes == nil {
1504 return
1505 }
1506 p.emitList((*Printer).emitTypeParameterDeclarationNode, parentNode, nodes, LFTypeParameters|core.IfElse(ast.IsArrowFunction(parentNode) /*p.shouldAllowTrailingComma(parentNode, nodes)*/, LFAllowTrailingComma, LFNone)) // TODO: preserve trailing comma after Strada migration
1507}
1508
1509func (p *Printer) emitTypeAnnotation(node *ast.TypeNode) {
1510 if node == nil {

Callers 8

emitSignatureMethod · 0.95
emitFunctionTypeMethod · 0.95
emitConstructorTypeMethod · 0.95
emitArrowFunctionMethod · 0.95
emitClassExpressionMethod · 0.95
emitClassDeclarationMethod · 0.95

Calls 3

emitListMethod · 0.95
IfElseFunction · 0.92
IsArrowFunctionFunction · 0.92

Tested by

no test coverage detected