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

Function combineIntersectionThisParam

test/fixtures/snapshot/typescript.js:73190–73199  ·  view source on GitHub ↗
(left, right, mapper)

Source from the content-addressed store, hash-verified

73188 : undefined;
73189 }
73190 function combineIntersectionThisParam(left, right, mapper) {
73191 if (!left || !right) {
73192 return left || right;
73193 }
73194 // A signature `this` type might be a read or a write position... It's very possible that it should be invariant
73195 // and we should refuse to merge signatures if there are `this` types and they do not match. However, so as to be
73196 // pessimistic when contextual typing, for now, we'll union the `this` types.
73197 var thisType = getUnionType([getTypeOfSymbol(left), instantiateType(getTypeOfSymbol(right), mapper)]);
73198 return createSymbolWithType(left, thisType);
73199 }
73200 function combineIntersectionParameters(left, right, mapper) {
73201 var leftCount = getParameterCount(left);
73202 var rightCount = getParameterCount(right);

Calls 4

getUnionTypeFunction · 0.85
getTypeOfSymbolFunction · 0.85
instantiateTypeFunction · 0.85
createSymbolWithTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…