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

Function getTypeForDeclarationFromJSDocComment

test/fixtures/snapshot/typescript.js:55925–55931  ·  view source on GitHub ↗
(declaration)

Source from the content-addressed store, hash-verified

55923 return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* CheckMode.Normal */)], 2 /* UnionReduction.Subtype */));
55924 }
55925 function getTypeForDeclarationFromJSDocComment(declaration) {
55926 var jsdocType = ts.getJSDocType(declaration);
55927 if (jsdocType) {
55928 return getTypeFromTypeNode(jsdocType);
55929 }
55930 return undefined;
55931 }
55932 function isNullOrUndefined(node) {
55933 var expr = ts.skipParentheses(node, /*excludeJSDocTypeAssertions*/ true);
55934 return expr.kind === 104 /* SyntaxKind.NullKeyword */ || expr.kind === 79 /* SyntaxKind.Identifier */ && getResolvedSymbol(expr) === undefinedSymbol;

Callers 4

getTypeOfAccessorsFunction · 0.85
checkObjectLiteralFunction · 0.85

Calls 1

getTypeFromTypeNodeFunction · 0.85

Tested by

no test coverage detected