mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
refactor: Create a new super class Event and prevent duplicate logic
This commit is contained in:
1 parent
2dc40a2254
commit
0f0f43b838
6 files changed
+109
-49
No files matched your search
@@ -9,16 +9,16 @@ export const exceptionSchema = z.object({
|
||||
response: responseSchema,
|
||||
})
|
||||
|
||||
export type Exception = z.infer<typeof exceptionSchema>
|
||||
export type IException = z.infer<typeof exceptionSchema>
|
||||
|
||||
export const stageExceptionSchema = exceptionSchema.extend({
|
||||
catchAll: z.boolean().default(false),
|
||||
})
|
||||
|
||||
export type StageException = z.infer<typeof stageExceptionSchema>
|
||||
export type IStageException = z.infer<typeof stageExceptionSchema>
|
||||
|
||||
export const globalExceptionSchema = exceptionSchema.extend({
|
||||
requirements: requirementsSchema.default([]),
|
||||
})
|
||||
|
||||
export type GlobalException = z.infer<typeof globalExceptionSchema>
|
||||
export type IGlobalException = z.infer<typeof globalExceptionSchema>
|
||||
@@ -3,6 +3,7 @@ export { stageSchema, IStage } from './stage.js'
|
||||
export { requirementsSchema, IRequirements } from './requirements.js'
|
||||
export { responseSchema, IResponse } from './response.js'
|
||||
export { questSchema, IQuest } from './quest.js'
|
||||
export { exceptionSchema, IException } from './exception.js'
|
||||
|
||||
export interface ICommand {
|
||||
command?: string
|
||||
|
||||
Reference in new issue
Block a user