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

Function addOptionality

test/fixtures/snapshot/typescript.js:55940–55944  ·  view source on GitHub ↗
(type, isProperty, isOptional)

Source from the content-addressed store, hash-verified

55938 return expr.kind === 204 /* SyntaxKind.ArrayLiteralExpression */ && expr.elements.length === 0;
55939 }
55940 function addOptionality(type, isProperty, isOptional) {
55941 if (isProperty === void 0) { isProperty = false; }
55942 if (isOptional === void 0) { isOptional = true; }
55943 return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type;
55944 }
55945 // Return the inferred type for a variable, parameter, or property declaration
55946 function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) {
55947 // A variable declared in a for..in statement is of type string, or of type keyof T when the

Calls 1

getOptionalTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…