This commit is contained in:
@@ -3,6 +3,7 @@ export * from "./DateTime"
|
||||
export * from "./encodedAsJsonValue"
|
||||
export * from "./Jsonifiable"
|
||||
export * from "./Kind"
|
||||
export * from "./makeJsonifiable"
|
||||
export * as MobX from "./MobX"
|
||||
export * from "./MutableClass"
|
||||
export * from "./MutableTaggedClass"
|
||||
|
||||
13
src/Schema/makeJsonifiable.ts
Normal file
13
src/Schema/makeJsonifiable.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Schema } from "@effect/schema"
|
||||
import type { JsonValue } from "type-fest"
|
||||
|
||||
|
||||
export const makeJsonifiable = <
|
||||
JsonifiableA,
|
||||
JsonifiableI extends JsonValue,
|
||||
JsonifiableR,
|
||||
>(
|
||||
jsonifiable: Schema.Schema<JsonifiableA, JsonifiableI, JsonifiableR>
|
||||
) =>
|
||||
<A, R>(schema: Schema.Schema<A, JsonifiableA, R>) =>
|
||||
jsonifiable.pipe(Schema.compose(schema))
|
||||
Reference in New Issue
Block a user