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

Method Map

internal/checker/mapper.go:301–315  ·  view source on GitHub ↗
(t *Type)

Source from the content-addressed store, hash-verified

299}
300
301func (m *InferenceTypeMapper) Map(t *Type) *Type {
302 for i, inference := range m.n.inferences {
303 if t == inference.typeParameter {
304 if m.fixing && !inference.isFixed {
305 // Before we commit to a particular inference (and thus lock out any further inferences),
306 // we infer from any intra-expression inference sites we have collected.
307 m.c.inferFromIntraExpressionSites(m.n)
308 clearCachedInferences(m.n.inferences)
309 inference.isFixed = true
310 }
311 return m.c.getInferredType(m.n, i)
312 }
313 }
314 return t
315}

Callers

nothing calls this directly

Calls 3

clearCachedInferencesFunction · 0.85
getInferredTypeMethod · 0.80

Tested by

no test coverage detected