This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
export * from "./Class"
|
export * from "./Class"
|
||||||
export * from "./composeJsonifiable"
|
|
||||||
export * from "./DateTime"
|
export * from "./DateTime"
|
||||||
export * from "./encodedAsPrismaJsonValue"
|
export * from "./encodedAsPrismaJsonValue"
|
||||||
export * from "./Kind"
|
export * from "./Kind"
|
||||||
|
export * from "./makeJsonifiable"
|
||||||
export * as MobX from "./MobX"
|
export * as MobX from "./MobX"
|
||||||
export * from "./MutableClass"
|
export * from "./MutableClass"
|
||||||
export * from "./MutableTaggedClass"
|
export * from "./MutableTaggedClass"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Schema } from "@effect/schema"
|
|||||||
import type { JsonValue } from "type-fest"
|
import type { JsonValue } from "type-fest"
|
||||||
|
|
||||||
|
|
||||||
export const composeJsonifiable = <
|
export const makeJsonifiable = <
|
||||||
JsonifiableA,
|
JsonifiableA,
|
||||||
JsonifiableI extends JsonValue,
|
JsonifiableI extends JsonValue,
|
||||||
JsonifiableR,
|
JsonifiableR,
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Schema as S } from "@effect/schema"
|
import { Schema as S } from "@effect/schema"
|
||||||
import { reaction, runInAction } from "mobx"
|
import { reaction, runInAction } from "mobx"
|
||||||
import type { Simplify } from "type-fest"
|
import type { Simplify } from "type-fest"
|
||||||
import { composeJsonifiable, MutableTaggedClass } from "./Schema"
|
import { makeJsonifiable, MutableTaggedClass } from "./Schema"
|
||||||
import { ObservableClass } from "./Schema/MobX"
|
import { ObservableClass } from "./Schema/MobX"
|
||||||
import type { ExtendAll } from "./Types"
|
import type { ExtendAll } from "./Types"
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ class User extends MutableTaggedClass<User>()("User", {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
const JsonifiableUser = User.pipe(
|
const JsonifiableUser = User.pipe(
|
||||||
composeJsonifiable(S.Struct({
|
makeJsonifiable(S.Struct({
|
||||||
...User.fields,
|
...User.fields,
|
||||||
id: S.BigInt,
|
id: S.BigInt,
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user