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

Function typeNodeIsEquivalentToType

test/fixtures/snapshot/typescript.js:53940–53949  ·  view source on GitHub ↗
(typeNode, annotatedDeclaration, type)

Source from the content-addressed store, hash-verified

53938 return result;
53939 }
53940 function typeNodeIsEquivalentToType(typeNode, annotatedDeclaration, type) {
53941 var typeFromTypeNode = getTypeFromTypeNode(typeNode);
53942 if (typeFromTypeNode === type) {
53943 return true;
53944 }
53945 if (ts.isParameter(annotatedDeclaration) && annotatedDeclaration.questionToken) {
53946 return getTypeWithFacts(type, 524288 /* TypeFacts.NEUndefined */) === typeFromTypeNode;
53947 }
53948 return false;
53949 }
53950 function serializeReturnTypeForSignature(context, type, signature, includePrivateSymbol, bundled) {
53951 if (!isErrorType(type) && context.enclosingDeclaration) {
53952 var annotation = signature.declaration && ts.getEffectiveReturnTypeNode(signature.declaration);

Callers 1

Calls 2

getTypeFromTypeNodeFunction · 0.85
getTypeWithFactsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…