mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
fix: Use ElementOf<T> instead of array indexing (#23132)
This commit is contained in:
parent
deafd3fcce
commit
eb90c5b0a0
@ -1,4 +1,4 @@
|
|||||||
import { tuple } from './type';
|
import { ElementOf, tuple } from './type';
|
||||||
|
|
||||||
export const PresetStatusColorTypes = tuple('success', 'processing', 'error', 'default', 'warning');
|
export const PresetStatusColorTypes = tuple('success', 'processing', 'error', 'default', 'warning');
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
@ -18,5 +18,5 @@ export const PresetColorTypes = tuple(
|
|||||||
'lime',
|
'lime',
|
||||||
);
|
);
|
||||||
|
|
||||||
export type PresetColorType = typeof PresetColorTypes[number];
|
export type PresetColorType = ElementOf<typeof PresetColorTypes>;
|
||||||
export type PresetStatusColorType = typeof PresetStatusColorTypes[number];
|
export type PresetStatusColorType = ElementOf<typeof PresetStatusColorTypes>;
|
||||||
|
Loading…
Reference in New Issue
Block a user