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

Method parseTypeParameterOfInferType

internal/parser/parser.go:2700–2705  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2698}
2699
2700func (p *Parser) parseTypeParameterOfInferType() *ast.Node {
2701 pos := p.nodePos()
2702 name := p.parseIdentifier()
2703 constraint := p.tryParseConstraintOfInferType()
2704 return p.finishNode(p.factory.NewTypeParameterDeclaration(nil /*modifiers*/, name, constraint, nil /*expression*/, nil /*defaultType*/), pos)
2705}
2706
2707func (p *Parser) tryParseConstraintOfInferType() *ast.Node {
2708 state := p.mark()

Callers 1

parseInferTypeMethod · 0.95

Calls 5

nodePosMethod · 0.95
parseIdentifierMethod · 0.95
finishNodeMethod · 0.95

Tested by

no test coverage detected