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

Method emitVariableDeclaration

internal/printer/printer.go:3693–3700  ·  view source on GitHub ↗

Declarations

(node *ast.VariableDeclaration)

Source from the content-addressed store, hash-verified

3691//
3692
3693func (p *Printer) emitVariableDeclaration(node *ast.VariableDeclaration) {
3694 state := p.enterNode(node.AsNode())
3695 p.emitBindingName(node.Name())
3696 p.emitPunctuationNode(node.ExclamationToken)
3697 p.emitTypeAnnotation(node.Type)
3698 p.emitInitializer(node.Initializer, greatestEnd(node.Name().End(), node.Type, p.emitContext.GetTypeNode(node.Name())), node.AsNode())
3699 p.exitNode(node.AsNode(), state)
3700}
3701
3702func (p *Printer) emitVariableDeclarationNode(node *ast.VariableDeclarationNode) {
3703 p.emitVariableDeclaration(node.AsVariableDeclaration())

Callers 3

emitCatchClauseMethod · 0.95
WriteMethod · 0.95

Calls 11

enterNodeMethod · 0.95
emitBindingNameMethod · 0.95
emitPunctuationNodeMethod · 0.95
emitTypeAnnotationMethod · 0.95
emitInitializerMethod · 0.95
exitNodeMethod · 0.95
greatestEndFunction · 0.85
GetTypeNodeMethod · 0.80
AsNodeMethod · 0.65
NameMethod · 0.65
EndMethod · 0.65

Tested by

no test coverage detected