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

Function getMappedTypeModifiers

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

Source from the content-addressed store, hash-verified

58676 return type.modifiersType;
58677 }
58678 function getMappedTypeModifiers(type) {
58679 var declaration = type.declaration;
58680 return (declaration.readonlyToken ? declaration.readonlyToken.kind === 40 /* SyntaxKind.MinusToken */ ? 2 /* MappedTypeModifiers.ExcludeReadonly */ : 1 /* MappedTypeModifiers.IncludeReadonly */ : 0) |
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;

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…