mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
481 B
Plaintext
22 lines
481 B
Plaintext
circularBaseConstraint.ts(14,8): error TS2304: Cannot find name 'a'.
|
|
|
|
|
|
==== circularBaseConstraint.ts (1 errors) ====
|
|
// Repro from #54610
|
|
|
|
type A<T> = T;
|
|
|
|
type B<T> = T extends any[]
|
|
? never
|
|
: A<T> extends infer key
|
|
? key extends keyof T
|
|
? B<T[key]>
|
|
: never
|
|
: never;
|
|
|
|
function foo<T>() {
|
|
`${a}` as B<T>;
|
|
~
|
|
!!! error TS2304: Cannot find name 'a'.
|
|
}
|
|
|