feat(typescript-types): Add test for any and never in OptionalKeysOf
This commit is contained in:
@@ -22,9 +22,11 @@ The types included in this library are categorized by their purpose.
|
||||
|
||||
#### Extraction Types
|
||||
|
||||
| Type | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [`OptionalKeysOf<T>`][] | A union of all keys of `T` that are marked as optional. If `T` is a union, a union of the optional keys of all union members of `T` is returned. |
|
||||
| Type | Description |
|
||||
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`OptionalKeysOf<T>`][] | A union of all keys of `T` that are marked as optional. If `T` is a union, a union of the optional keys of all union members of `T` is returned[^optional-keys-of_remark]. |
|
||||
|
||||
[^optional-keys-of_remark]: If `T` is `any`, it returns a union of string and number 'string | number'.
|
||||
|
||||
[`OptionalKeysOf<T>`]: src/optional-keys-of.ts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user