Skip to content

Commit fd57ed8

Browse files
authored
Merge pull request #1205 from david-roper/record-array-fixes
Record array fixes
2 parents 88edf61 + e69c196 commit fd57ed8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ const $InstrumentMeasureVisibility: z.ZodType<InstrumentMeasureVisibility> = z.e
9494

9595
const $RecordArrayFieldValue = z.union([z.string(), z.boolean(), z.number(), z.date(), z.undefined()]);
9696

97+
const $RecordArrayPair = z.record(z.string(), $RecordArrayFieldValue);
98+
9799
const $InstrumentMeasureValue: z.ZodType<InstrumentMeasureValue> = z.union([
98100
z.string(),
99101
z.boolean(),
100102
z.number(),
101103
z.date(),
102-
z.array($RecordArrayFieldValue),
104+
z.array($RecordArrayPair),
103105
z.undefined()
104106
]);
105107

0 commit comments

Comments
 (0)