feat(typescript-types): Add test for any and never in OptionalKeysOf
This commit is contained in:
@@ -31,6 +31,9 @@ expect<OptionalKeysOf<Example1 | Example2>>().type.toBe<
|
||||
'optionalKey' | 'anotherOptional' | 'optionalKey2' | 'anotherOptional2'
|
||||
>()
|
||||
|
||||
expect<OptionalKeysOf<any>>().type.toBe<string | number>()
|
||||
expect<OptionalKeysOf<never>>().type.toBeAssignableWith<never>()
|
||||
|
||||
expect<Pick<Example1, OptionalKeysOf<Example1>>>().type.toBe<
|
||||
ExpectKeyOf<Example1, OptionalKeysOf<Example1>>
|
||||
>()
|
||||
|
||||
Reference in New Issue
Block a user