refactor: Create a new super class Event and prevent duplicate logic

This commit is contained in:
Justin Lin committed 2025-04-21 12:23:09 +08:00
1 parent 2dc40a2254
commit 0f0f43b838
6 files changed
+109 -49

No files matched your search

+3 -3
View File
@@ -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>
+1
View File
@@ -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