makeJsonifiable -> toJsonifiable
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2024-08-20 23:28:21 +02:00
parent 454c9d2354
commit 2eabef5246
3 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
import { Schema } from "@effect/schema"
import type { JsonValue } from "type-fest"
export const toJsonifiable = <
JsonifiableA,
JsonifiableI extends JsonValue,
JsonifiableR,
>(
jsonifiableSchema: Schema.Schema<JsonifiableA, JsonifiableI, JsonifiableR>
) =>
<A, R>(decodedSchema: Schema.Schema<A, JsonifiableA, R>) =>
Schema.compose(jsonifiableSchema, decodedSchema)