Something went wrong. Try again.
Starship Simulator Controls thoriumsim.com
Something went wrong. Try again.
360 B · 20 lines
TypeScript
at develop
123456789101112131415161718192021import z from "zod";
export const variables = z .object({ variables: z.array( z.discriminatedUnion("type", [ z.object({ name: z.string(), type: z.literal("any"), value: z.any(), }), z.object({ name: z.string(), type: z.literal("entity"), value: z.number(), }), ]), ), }) .default({ variables: [] });