mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add regression test
This commit is contained in:
1 parent
b9f805f2f4
commit
2c951b3ca9
1 file changed
+5
@@ -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 };
|
||||
Reference in new issue
Block a user