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

Function getCombinedMappedTypeOptionality

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

Source from the content-addressed store, hash-verified

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);
58690 return optionality || (isGenericMappedType(modifiersType) ? getMappedTypeOptionality(modifiersType) : 0);
58691 }
58692 function isPartialMappedType(type) {
58693 return !!(ts.getObjectFlags(type) & 32 /* ObjectFlags.Mapped */ && getMappedTypeModifiers(type) & 4 /* MappedTypeModifiers.IncludeOptional */);
58694 }

Callers 1

mappedTypeRelatedToFunction · 0.85

Calls 3

getMappedTypeOptionalityFunction · 0.85
isGenericMappedTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…