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

Method nextIsStartOfMappedType

internal/parser/parser.go:3128–3137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3126}
3127
3128func (p *Parser) nextIsStartOfMappedType() bool {
3129 p.nextToken()
3130 if p.token == ast.KindPlusToken || p.token == ast.KindMinusToken {
3131 return p.nextToken() == ast.KindReadonlyKeyword
3132 }
3133 if p.token == ast.KindReadonlyKeyword {
3134 p.nextToken()
3135 }
3136 return p.token == ast.KindOpenBracketToken && p.nextTokenIsIdentifier() && p.nextToken() == ast.KindInKeyword
3137}
3138
3139func (p *Parser) parseMappedType() *ast.Node {
3140 pos := p.nodePos()

Callers

nothing calls this directly

Calls 2

nextTokenMethod · 0.95
nextTokenIsIdentifierMethod · 0.95

Tested by

no test coverage detected