( dataSchema: T, )
| 86 | export type MonkeyServerErrorType = z.infer<typeof MonkeyServerError>; |
| 87 | |
| 88 | export function responseWithNullableData<T extends ZodSchema>( |
| 89 | dataSchema: T, |
| 90 | ): z.ZodObject< |
| 91 | z.objectUtil.extendShape< |
| 92 | typeof MonkeyResponseSchema.shape, |
| 93 | { |
| 94 | data: z.ZodNullable<T>; |
| 95 | } |
| 96 | > |
| 97 | > { |
| 98 | return MonkeyResponseSchema.extend({ |
| 99 | data: dataSchema.nullable(), |
| 100 | }); |
| 101 | } |
| 102 | |
| 103 | export function responseWithData<T extends ZodSchema>( |
| 104 | dataSchema: T, |
no outgoing calls
no test coverage detected