Skip to content
Snippets Groups Projects
Commit 70123251 authored by michael.minelli's avatar michael.minelli
Browse files

AssignmentFile => Migrate to zod format

parent ace21995
No related branches found
No related tags found
No related merge requests found
import ImmutableFileDescriptor from './ImmutableFileDescriptor'; import { ImmutableFileDescriptor, immutableFileDescriptorSchema } from './ImmutableFileDescriptor';
import { z } from 'zod';
interface AssignmentFile { const AssignmentFile = z.object({
dojoAssignmentVersion: number, dojoAssignmentVersion: z.number(),
version: number, version : z.number(),
immutable : z.array(immutableFileDescriptorSchema.transform(value => value as ImmutableFileDescriptor)),
result : z.object({
container: z.string(),
volume : z.string().optional()
})
}).strict();
immutable: Array<ImmutableFileDescriptor>
result: { type AssignmentFile = z.infer<typeof AssignmentFile>;
container: string, volume?: string
}
}
export default AssignmentFile; export default AssignmentFile;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment