feat(types): enhance Option type to support customizable label types (#735)

Co-authored-by: a <a@gmail.com>
This commit is contained in:
WgoW
2025-04-23 21:34:06 +08:00
committed by GitHub
parent 05dc11e258
commit 123d2c9074
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ declare namespace CommonType {
* @property value: The option value
* @property label: The option label
*/
type Option<K = string> = { value: K; label: string };
type Option<K = string, M = string> = { value: K; label: M };
type YesOrNo = 'Y' | 'N';