MCPcopy Create free account
hub / github.com/nodejs/node / isJSDocOptionalParameter

Function isJSDocOptionalParameter

test/fixtures/snapshot/typescript.js:59530–59538  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

59528 return result;
59529 }
59530 function isJSDocOptionalParameter(node) {
59531 return ts.isInJSFile(node) && (
59532 // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType
59533 node.type && node.type.kind === 316 /* SyntaxKind.JSDocOptionalType */
59534 || ts.getJSDocParameterTags(node).some(function (_a) {
59535 var isBracketed = _a.isBracketed, typeExpression = _a.typeExpression;
59536 return isBracketed || !!typeExpression && typeExpression.type.kind === 316 /* SyntaxKind.JSDocOptionalType */;
59537 }));
59538 }
59539 function tryFindAmbientModule(moduleName, withAugmentations) {
59540 if (ts.isExternalModuleNameRelative(moduleName)) {
59541 return undefined;

Callers 4

isOptionalParameterFunction · 0.85
isAritySmallerFunction · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected