mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 02:35:48 -05:00
Update tests
This commit is contained in:
@@ -37,7 +37,7 @@ type T33<T> = T extends never ? true : false; // Deferred
|
||||
// keyof unknown
|
||||
|
||||
type T40 = keyof any; // string | number | symbol
|
||||
type T41 = keyof unknown; // string | number | symbol
|
||||
type T41 = keyof unknown; // never
|
||||
|
||||
// Only equality operators are allowed with unknown
|
||||
|
||||
@@ -82,8 +82,8 @@ function f20(x: unknown) {
|
||||
// Homomorphic mapped type over unknown
|
||||
|
||||
type T50<T> = { [P in keyof T]: number };
|
||||
type T51 = T50<unknown>; // { [x: string]: number }
|
||||
type T52 = T50<any>; // { [x: string]: number }
|
||||
type T51 = T50<any>; // { [x: string]: number }
|
||||
type T52 = T50<unknown>; // {}
|
||||
|
||||
// Anything is assignable to unknown
|
||||
|
||||
|
||||
Reference in New Issue
Block a user