MCPcopy Index your code
hub / github.com/nodejs/node / getDefaultFromTypeParameter

Function getDefaultFromTypeParameter

test/fixtures/snapshot/typescript.js:59094–59097  ·  view source on GitHub ↗

* Gets the default type for a type parameter. * * If the type parameter is the result of an instantiation, this gets the instantiated * default type of its target. If the type parameter has no default type or the default is * circular, `undefined` is returned.

(typeParameter)

Source from the content-addressed store, hash-verified

59092 * circular, `undefined` is returned.
59093 */
59094 function getDefaultFromTypeParameter(typeParameter) {
59095 var defaultType = getResolvedTypeParameterDefault(typeParameter);
59096 return defaultType !== noConstraintType && defaultType !== circularConstraintType ? defaultType : undefined;
59097 }
59098 function hasNonCircularTypeParameterDefault(typeParameter) {
59099 return getResolvedTypeParameterDefault(typeParameter) !== circularConstraintType;
59100 }

Callers 9

createTypeCheckerFunction · 0.85
fillMissingTypeArgumentsFunction · 0.85
getInferredTypeFunction · 0.85
inferTypeArgumentsFunction · 0.85
checkTypeParameterFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…