MCPcopy Create free account
hub / github.com/microsoft/typescript-go / emitImportTypeNodeAttributes

Method emitImportTypeNodeAttributes

internal/printer/printer.go:2217–2228  ·  view source on GitHub ↗
(node *ast.ImportAttributes)

Source from the content-addressed store, hash-verified

2215}
2216
2217func (p *Printer) emitImportTypeNodeAttributes(node *ast.ImportAttributes) {
2218 state := p.enterNode(node.AsNode())
2219 p.writePunctuation("{")
2220 p.writeSpace()
2221 p.writeKeyword(core.IfElse(node.Token == ast.KindAssertKeyword, "assert", "with"))
2222 p.writePunctuation(":")
2223 p.writeSpace()
2224 p.emitList((*Printer).emitImportAttributeNode, node.AsNode(), node.Attributes, LFImportAttributes)
2225 p.writeSpace()
2226 p.writePunctuation("}")
2227 p.exitNode(node.AsNode(), state)
2228}
2229
2230func (p *Printer) emitImportTypeNode(node *ast.ImportTypeNode) {
2231 state := p.enterNode(node.AsNode())

Callers 1

emitImportTypeNodeMethod · 0.95

Calls 8

enterNodeMethod · 0.95
writePunctuationMethod · 0.95
writeSpaceMethod · 0.95
writeKeywordMethod · 0.95
emitListMethod · 0.95
exitNodeMethod · 0.95
IfElseFunction · 0.92
AsNodeMethod · 0.65

Tested by

no test coverage detected