Skip to content

Commit a107fb5

Browse files
committed
fix: update SingleData type definition and change Data to union
1 parent 2a36b77 commit a107fb5

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

packages/exd/src/schema/saintcoinach/interface.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const DataBase = z.object({
55
})
66

77
export const SingleData = DataBase.extend({
8-
type: z.literal(undefined),
8+
type: z.undefined().optional(),
99
name: z.string(),
1010
converter: z.any().optional(),
1111
})
@@ -23,11 +23,7 @@ export const RepeatData = DataBase.extend({
2323
definition: z.unknown(),
2424
})
2525

26-
export const Data = z.discriminatedUnion('type', [
27-
SingleData,
28-
GroupData,
29-
RepeatData,
30-
])
26+
export const Data = z.union([SingleData, GroupData, RepeatData])
3127

3228
export const DefinitionSchema = z.object({
3329
sheet: z.string(),

0 commit comments

Comments
 (0)