(source, target, skipParameters)
| 69049 | } |
| 69050 | } |
| 69051 | function inferFromSignature(source, target, skipParameters) { |
| 69052 | if (!skipParameters) { |
| 69053 | var saveBivariant = bivariant; |
| 69054 | var kind = target.declaration ? target.declaration.kind : 0 /* SyntaxKind.Unknown */; |
| 69055 | // Once we descend into a bivariant signature we remain bivariant for all nested inferences |
| 69056 | bivariant = bivariant || kind === 169 /* SyntaxKind.MethodDeclaration */ || kind === 168 /* SyntaxKind.MethodSignature */ || kind === 171 /* SyntaxKind.Constructor */; |
| 69057 | applyToParameterTypes(source, target, inferFromContravariantTypes); |
| 69058 | bivariant = saveBivariant; |
| 69059 | } |
| 69060 | applyToReturnTypes(source, target, inferFromTypes); |
| 69061 | } |
| 69062 | function inferFromIndexTypes(source, target) { |
| 69063 | // Inferences across mapped type index signatures are pretty much the same a inferences to homomorphic variables |
| 69064 | var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* ObjectFlags.Mapped */) ? 8 /* InferencePriority.HomomorphicMappedType */ : 0; |
no test coverage detected