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

Function getMappedTypeOptionality

test/fixtures/snapshot/typescript.js:58683–58686  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

58681 (declaration.questionToken ? declaration.questionToken.kind === 40 /* SyntaxKind.MinusToken */ ? 8 /* MappedTypeModifiers.ExcludeOptional */ : 4 /* MappedTypeModifiers.IncludeOptional */ : 0);
58682 }
58683 function getMappedTypeOptionality(type) {
58684 var modifiers = getMappedTypeModifiers(type);
58685 return modifiers & 8 /* MappedTypeModifiers.ExcludeOptional */ ? -1 : modifiers & 4 /* MappedTypeModifiers.IncludeOptional */ ? 1 : 0;
58686 }
58687 function getCombinedMappedTypeOptionality(type) {
58688 var optionality = getMappedTypeOptionality(type);
58689 var modifiersType = getModifiersTypeFromMappedType(type);

Callers 1

Calls 1

getMappedTypeModifiersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…