refactor(web): convert ValidatedStatus enum to as-const in key-valida… (#35749)

Co-authored-by: yeranyang <yeranyang@tencent.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
guangyang1206 2026-05-04 17:36:35 +08:00 committed by GitHub
parent d92c336394
commit 81090effe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 8 deletions

View File

@ -2778,9 +2778,6 @@
}
},
"web/app/components/header/account-setting/key-validator/declarations.ts": {
"erasable-syntax-only/enums": {
"count": 1
},
"ts/no-explicit-any": {
"count": 1
}

View File

@ -1,10 +1,12 @@
import type { Dispatch, SetStateAction } from 'react'
export enum ValidatedStatus {
Success = 'success',
Error = 'error',
Exceed = 'exceed',
}
export const ValidatedStatus = {
Success: 'success',
Error: 'error',
Exceed: 'exceed',
} as const
export type ValidatedStatus = typeof ValidatedStatus[keyof typeof ValidatedStatus]
export type ValidatedStatusState = {
status?: ValidatedStatus