mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Accept new baselines
This commit is contained in:
parent
f6c79a631c
commit
069eac09ec
@ -0,0 +1,11 @@
|
||||
//// [reverseMappedContravariantInference.ts]
|
||||
// Repro from #21273
|
||||
|
||||
declare function conforms<T>(source: { [K in keyof T]: (val: T[K]) => boolean }): (value: T) => boolean;
|
||||
conforms({ foo: (v: string) => false })({ foo: "hello" });
|
||||
|
||||
|
||||
//// [reverseMappedContravariantInference.js]
|
||||
"use strict";
|
||||
// Repro from #21273
|
||||
conforms({ foo: function (v) { return false; } })({ foo: "hello" });
|
||||
@ -0,0 +1,21 @@
|
||||
=== tests/cases/compiler/reverseMappedContravariantInference.ts ===
|
||||
// Repro from #21273
|
||||
|
||||
declare function conforms<T>(source: { [K in keyof T]: (val: T[K]) => boolean }): (value: T) => boolean;
|
||||
>conforms : Symbol(conforms, Decl(reverseMappedContravariantInference.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
|
||||
>source : Symbol(source, Decl(reverseMappedContravariantInference.ts, 2, 29))
|
||||
>K : Symbol(K, Decl(reverseMappedContravariantInference.ts, 2, 40))
|
||||
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
|
||||
>val : Symbol(val, Decl(reverseMappedContravariantInference.ts, 2, 56))
|
||||
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
|
||||
>K : Symbol(K, Decl(reverseMappedContravariantInference.ts, 2, 40))
|
||||
>value : Symbol(value, Decl(reverseMappedContravariantInference.ts, 2, 83))
|
||||
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
|
||||
|
||||
conforms({ foo: (v: string) => false })({ foo: "hello" });
|
||||
>conforms : Symbol(conforms, Decl(reverseMappedContravariantInference.ts, 0, 0))
|
||||
>foo : Symbol(foo, Decl(reverseMappedContravariantInference.ts, 3, 10))
|
||||
>v : Symbol(v, Decl(reverseMappedContravariantInference.ts, 3, 17))
|
||||
>foo : Symbol(foo, Decl(reverseMappedContravariantInference.ts, 3, 41))
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
=== tests/cases/compiler/reverseMappedContravariantInference.ts ===
|
||||
// Repro from #21273
|
||||
|
||||
declare function conforms<T>(source: { [K in keyof T]: (val: T[K]) => boolean }): (value: T) => boolean;
|
||||
>conforms : <T>(source: { [K in keyof T]: (val: T[K]) => boolean; }) => (value: T) => boolean
|
||||
>T : T
|
||||
>source : { [K in keyof T]: (val: T[K]) => boolean; }
|
||||
>K : K
|
||||
>T : T
|
||||
>val : T[K]
|
||||
>T : T
|
||||
>K : K
|
||||
>value : T
|
||||
>T : T
|
||||
|
||||
conforms({ foo: (v: string) => false })({ foo: "hello" });
|
||||
>conforms({ foo: (v: string) => false })({ foo: "hello" }) : boolean
|
||||
>conforms({ foo: (v: string) => false }) : (value: { foo: any; }) => boolean
|
||||
>conforms : <T>(source: { [K in keyof T]: (val: T[K]) => boolean; }) => (value: T) => boolean
|
||||
>{ foo: (v: string) => false } : { foo: (v: string) => boolean; }
|
||||
>foo : (v: string) => boolean
|
||||
>(v: string) => false : (v: string) => boolean
|
||||
>v : string
|
||||
>false : false
|
||||
>{ foo: "hello" } : { foo: string; }
|
||||
>foo : string
|
||||
>"hello" : "hello"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user