(left, right)
| 73239 | return params; |
| 73240 | } |
| 73241 | function combineSignaturesOfIntersectionMembers(left, right) { |
| 73242 | var typeParams = left.typeParameters || right.typeParameters; |
| 73243 | var paramMapper; |
| 73244 | if (left.typeParameters && right.typeParameters) { |
| 73245 | paramMapper = createTypeMapper(right.typeParameters, left.typeParameters); |
| 73246 | // We just use the type parameter defaults from the first signature |
| 73247 | } |
| 73248 | var declaration = left.declaration; |
| 73249 | var params = combineIntersectionParameters(left, right, paramMapper); |
| 73250 | var thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper); |
| 73251 | var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); |
| 73252 | var result = createSignature(declaration, typeParams, thisParam, params, |
| 73253 | /*resolvedReturnType*/ undefined, |
| 73254 | /*resolvedTypePredicate*/ undefined, minArgCount, (left.flags | right.flags) & 39 /* SignatureFlags.PropagatingFlags */); |
| 73255 | result.compositeKind = 2097152 /* TypeFlags.Intersection */; |
| 73256 | result.compositeSignatures = ts.concatenate(left.compositeKind === 2097152 /* TypeFlags.Intersection */ && left.compositeSignatures || [left], [right]); |
| 73257 | if (paramMapper) { |
| 73258 | result.mapper = left.compositeKind === 2097152 /* TypeFlags.Intersection */ && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper; |
| 73259 | } |
| 73260 | return result; |
| 73261 | } |
| 73262 | // If the given type is an object or union type with a single signature, and if that signature has at |
| 73263 | // least as many parameters as the given function, return the signature. Otherwise return undefined. |
| 73264 | function getContextualCallSignature(type, node) { |
no test coverage detected
searching dependent graphs…