|
| 1 | +/* eslint-disable max-lines */ |
| 2 | + |
1 | 3 | import { isNumberLike, isPlainObject, parseNumber } from '@douglasneuroinformatics/libjs'; |
2 | 4 | import type { AnyUnilingualFormInstrument, FormTypes, Json } from '@opendatacapture/runtime-core'; |
3 | 5 | import type { Group } from '@opendatacapture/schemas/group'; |
@@ -366,7 +368,8 @@ export function createUploadTemplateCSV(instrument: AnyUnilingualFormInstrument) |
366 | 368 | let shape: { [key: string]: z.ZodTypeAny } = {}; |
367 | 369 | // TODO - include ZodEffect as a typename like our other types |
368 | 370 | if ((instrumentSchema._def.typeName as string) === 'ZodEffects') { |
369 | | - // TODO - find a type safe way to call this |
| 371 | + // @ts-expect-error - TODO - find a type safe way to call this |
| 372 | + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access |
370 | 373 | shape = instrumentSchema._def.schema._def.shape() as { [key: string]: z.ZodTypeAny }; |
371 | 374 | } else { |
372 | 375 | shape = instrumentSchema.shape as { [key: string]: z.ZodTypeAny }; |
@@ -402,8 +405,8 @@ export async function processInstrumentCSV( |
402 | 405 | let instrumentSchemaWithInternal: z.AnyZodObject; |
403 | 406 |
|
404 | 407 | if ((instrumentSchema._def.typeName as string) === 'ZodEffects') { |
405 | | - // TODO - find a type safe way to call this |
406 | | - |
| 408 | + // @ts-expect-error - TODO - find a type safe way to call this |
| 409 | + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access |
407 | 410 | instrumentSchemaWithInternal = instrumentSchema._def.schema.extend({ |
408 | 411 | date: z.coerce.date(), |
409 | 412 | subjectID: z.string() |
|
0 commit comments