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

Method getTrueTypeFromConditionalType

internal/checker/checker.go:24447–24453  ·  view source on GitHub ↗
(t *Type)

Source from the content-addressed store, hash-verified

24445}
24446
24447func (c *Checker) getTrueTypeFromConditionalType(t *Type) *Type {
24448 d := t.AsConditionalType()
24449 if d.resolvedTrueType == nil {
24450 d.resolvedTrueType = c.instantiateType(c.getTypeFromTypeNode(d.root.node.TrueType), d.mapper)
24451 }
24452 return d.resolvedTrueType
24453}
24454
24455func (c *Checker) getFalseTypeFromConditionalType(t *Type) *Type {
24456 d := t.AsConditionalType()

Calls 3

instantiateTypeMethod · 0.95
getTypeFromTypeNodeMethod · 0.95
AsConditionalTypeMethod · 0.80

Tested by

no test coverage detected