-
-
Notifications
You must be signed in to change notification settings - Fork 404
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the problem this feature would solve?
Right now decodingFallback
effects cannot use R
context requirements, limiting how fallback values can be computed. (e.g. from an API Client)
export type DecodingFallbackAnnotation<A> = (issue: ParseIssue) => Effect<A, ParseIssue>
What is the feature you are proposing to solve the problem?
export type DecodingFallbackAnnotation<A, R> = (issue: ParseIssue) => Effect<A, ParseIssue, R>
Schema.annotations({
decodingFallback: () => Effect.gen(function* () {
const fooApi = yield* FooApiTag
return yield* fooApi.getFoo()
})
})
What alternatives have you considered?
Parameterized dependency injection
const makeAnnotation = (fooApi) => Schema.annotations({
decodingFallback: () => fooApi.getFoo()
})
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request