| ... | @@ -41,10 +41,8 @@ function decodeForEvent<A>( | ... | @@ -41,10 +41,8 @@ function decodeForEvent<A>( |
| 41 | field: string, | 41 | field: string, |
| 42 | ): Effect.Effect<A, OrchestrationProjectorDecodeError> { | 42 | ): Effect.Effect<A, OrchestrationProjectorDecodeError> { |
| 43 | return Effect.try({ | 43 | return Effect.try({ |
| 44 | // eslint-disable-next-line @typescript-eslint/no-explicit-any | 44 | try: () => Schema.decodeUnknownSync(schema as any)(value), |
| 45 | try: () => Schema.decodeUnknownSync(schema as any)(value) as A, | 45 | catch: (error) => toProjectorDecodeError(`${eventType}:${field}`)(error as Schema.SchemaError), |
| 46 | catch: (error) => | | |
| 47 | toProjectorDecodeError(`${eventType}:${field}`)(error as Schema.SchemaError), | | |
| 48 | }); | 46 | }); |
| 49 | } | 47 | } |
| 50 | | 48 | |