mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:00:59 -04:00
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user