Skip to content

Events v2: form field validation example #524

Events v2: form field validation example

Events v2: form field validation example #524

Triggered via pull request December 16, 2024 08:39
Status Failure
Total duration 49s
Artifacts

test.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

7 errors
test: src/form/tennis-club-membership.ts#L12
Module '"@opencrvs/toolkit/events"' has no exported member 'defineForm'.
test: src/form/tennis-club-membership.ts#L21
Cannot find module '@opencrvs/toolkit/conditionals' or its corresponding type declarations.
test: src/form/tennis-club-membership.ts#L263
Type '{ type: "DECLARE"; label: { defaultMessage: string; description: string; id: string; }; forms: any[]; allowedWhen: any; }' is not assignable to type '{ type: "CREATE"; label: { id: string; description: string; defaultMessage: string; }; forms: { active: boolean; version: { id: string; label: { id: string; description: string; defaultMessage: string; }; }; label: { ...; }; pages: { ...; }[]; }[]; } | { ...; } | { ...; }'.
test: src/form/tennis-club-membership.ts#L266
Type '"VALIDATE"' is not assignable to type '"CREATE" | "DECLARE" | "REGISTER"'.
test: src/form/tennis-club-membership.ts#L284
Type '{ type: "REGISTER"; label: { defaultMessage: string; description: string; id: string; }; allowedWhen: any; forms: any[]; }' is not assignable to type '{ type: "CREATE"; label: { id: string; description: string; defaultMessage: string; }; forms: { active: boolean; version: { id: string; label: { id: string; description: string; defaultMessage: string; }; }; label: { ...; }; pages: { ...; }[]; }[]; } | { ...; } | { ...; }'.
test: src/form/tennis-club-membership.ts#L296
Type '"CUSTOM"' is not assignable to type '"CREATE" | "DECLARE" | "REGISTER"'.
test
Process completed with exit code 2.