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

Function getUnaryResultType

test/fixtures/snapshot/typescript.js:78530–78538  ·  view source on GitHub ↗
(operandType)

Source from the content-addressed store, hash-verified

78528 return getUnaryResultType(operandType);
78529 }
78530 function getUnaryResultType(operandType) {
78531 if (maybeTypeOfKind(operandType, 2112 /* TypeFlags.BigIntLike */)) {
78532 return isTypeAssignableToKind(operandType, 3 /* TypeFlags.AnyOrUnknown */) || maybeTypeOfKind(operandType, 296 /* TypeFlags.NumberLike */)
78533 ? numberOrBigIntType
78534 : bigintType;
78535 }
78536 // If it's not a bigint type, implicit coercion will result in a number
78537 return numberType;
78538 }
78539 function maybeTypeOfKindConsideringBaseConstraint(type, kind) {
78540 if (maybeTypeOfKind(type, kind)) {
78541 return true;

Callers 2

Calls 2

maybeTypeOfKindFunction · 0.85
isTypeAssignableToKindFunction · 0.85

Tested by

no test coverage detected