mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-08 08:14:51 -06:00
Add regression test
This commit is contained in:
parent
03c4809d5a
commit
02a3a74e3b
9
tests/cases/conformance/types/conditional/inferTypes2.ts
Normal file
9
tests/cases/conformance/types/conditional/inferTypes2.ts
Normal file
@ -0,0 +1,9 @@
|
||||
// @strict: true
|
||||
// @declaration: true
|
||||
|
||||
// Repro from #22755
|
||||
|
||||
export declare function foo<T>(obj: T): T extends () => infer P ? P : never;
|
||||
export function bar<T>(obj: T) {
|
||||
return foo(obj);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user