mirror of
https://github.com/gotson/komga.git
synced 2026-01-07 16:33:48 +01:00
refactor: use type instead of interface
This commit is contained in:
parent
0d5e827503
commit
4e5bcb9b65
6 changed files with 13 additions and 13 deletions
|
|
@ -35,11 +35,11 @@ const client = createClient<paths>({
|
|||
})
|
||||
client.use(coladaMiddleware)
|
||||
|
||||
interface SpringError {
|
||||
type SpringError = {
|
||||
message?: string
|
||||
}
|
||||
|
||||
export interface ErrorCause {
|
||||
export type ErrorCause = {
|
||||
body?: unknown
|
||||
status?: number
|
||||
message?: string
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ async function submitForm(isActive: Ref<boolean, boolean>) {
|
|||
}
|
||||
}
|
||||
|
||||
export interface DialogConfirmProps {
|
||||
export type DialogConfirmProps = {
|
||||
title?: string
|
||||
subtitle?: string
|
||||
okText?: string
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ async function submitForm(callback: () => void) {
|
|||
if (valid) callback()
|
||||
}
|
||||
|
||||
export interface DialogConfirmEditProps {
|
||||
export type DialogConfirmEditProps = {
|
||||
/**
|
||||
* Dialog title
|
||||
* @type string
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ import { commonMessages } from '@/utils/i18n/common-messages'
|
|||
|
||||
const intl = useIntl()
|
||||
|
||||
interface UserExtend {
|
||||
type UserExtend = {
|
||||
id?: string
|
||||
email: string
|
||||
password?: string
|
||||
|
|
|
|||
|
|
@ -29,22 +29,22 @@ export const useDialogsStore = defineStore('dialogs', {
|
|||
}),
|
||||
})
|
||||
|
||||
interface DialogActivation<T> {
|
||||
type DialogActivation<T> = {
|
||||
activator?: Element | string
|
||||
dialogProps: T
|
||||
callback: (hideDialog: () => void, setLoading: (isLoading: boolean) => void) => void
|
||||
}
|
||||
|
||||
interface DialogConfirmEditActivation extends DialogActivation<DialogConfirmEditProps> {
|
||||
type DialogConfirmEditActivation = DialogActivation<DialogConfirmEditProps> & {
|
||||
slot: ComponentWithProps
|
||||
record?: unknown
|
||||
}
|
||||
|
||||
interface DialogConfirmActivation extends DialogActivation<DialogConfirmProps> {
|
||||
type DialogConfirmActivation = DialogActivation<DialogConfirmProps> & {
|
||||
slotWarning: ComponentWithProps
|
||||
}
|
||||
|
||||
interface ComponentWithProps {
|
||||
type ComponentWithProps = {
|
||||
component?: Component
|
||||
props: object
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
export interface ActuatorInfo {
|
||||
export type ActuatorInfo = {
|
||||
git: ActuatorGit
|
||||
build: ActuatorBuild
|
||||
}
|
||||
|
||||
export interface ActuatorGit {
|
||||
export type ActuatorGit = {
|
||||
commit: ActuatorGitCommit
|
||||
branch: string
|
||||
}
|
||||
|
||||
export interface ActuatorGitCommit {
|
||||
export type ActuatorGitCommit = {
|
||||
time: Date
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface ActuatorBuild {
|
||||
export type ActuatorBuild = {
|
||||
version: string
|
||||
artifact: string
|
||||
name: string
|
||||
|
|
|
|||
Loading…
Reference in a new issue