mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:54:44 -06:00
Add regression test
This commit is contained in:
parent
b9f805f2f4
commit
2c951b3ca9
@ -34,3 +34,8 @@ type Example<T, U> = { [K in keyof T]: K extends keyof U ? UnexpectedError<K> :
|
||||
|
||||
type UnexpectedError<T extends PropertyKey> = T
|
||||
type NoErrorHere<T extends PropertyKey> = T
|
||||
|
||||
// Repro from #30331
|
||||
|
||||
type a<T> = T extends Array<infer U> ? U : never;
|
||||
type b<T> = { [K in a<T> & keyof T ]: 42 };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user