Skip to content

Commit 97ccfa2

Browse files
committed
feat: add type for field array value
1 parent 4cf991b commit 97ccfa2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/schemas/src/instrument/instrument.base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ const $UnilingualInstrumentDetails = $InstrumentDetails.extend({
9292

9393
const $InstrumentMeasureVisibility: z.ZodType<InstrumentMeasureVisibility> = z.enum(['hidden', 'visible']);
9494

95+
const $RecordArrayFieldValue = z.union([z.string(), z.boolean(), z.number(), z.date(), z.undefined()]);
96+
9597
const $InstrumentMeasureValue: z.ZodType<InstrumentMeasureValue> = z.union([
9698
z.string(),
9799
z.boolean(),
98100
z.number(),
99101
z.date(),
100-
z.array(z.any()),
102+
z.array($RecordArrayFieldValue),
101103
z.undefined()
102104
]);
103105

0 commit comments

Comments
 (0)