mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-10 19:19:20 +08:00
docs: Fixed typo (#48393)
Signed-off-by: LiveTembiso <livetembiso0@gmail.com>
This commit is contained in:
parent
912a447c05
commit
f460b48e8f
@ -39,13 +39,13 @@ type CheckboxGroupType = GetProps<typeof Checkbox.Group>;
|
|||||||
|
|
||||||
## GetProp
|
## GetProp
|
||||||
|
|
||||||
Get the single `props` property definition of the component. It has encapsulated `NonNullable`, so you don't have to worry about being empty:
|
Get the single `props` property definition of the component. It has encapsulated `NonNullable`, so you don't have to worry about it being empty:
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
import { Select } from 'antd';
|
import { Select } from 'antd';
|
||||||
import type { GetProp, SelectProps } from 'antd';
|
import type { GetProp, SelectProps } from 'antd';
|
||||||
|
|
||||||
// Both of this can work
|
// Both of these can work
|
||||||
type SelectOptionType1 = GetProp<SelectProps, 'options'>[number];
|
type SelectOptionType1 = GetProp<SelectProps, 'options'>[number];
|
||||||
type SelectOptionType2 = GetProp<typeof Select, 'options'>[number];
|
type SelectOptionType2 = GetProp<typeof Select, 'options'>[number];
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user