diff --git a/src/Schema/index.ts b/src/Schema/index.ts index f99b782..b047a9e 100644 --- a/src/Schema/index.ts +++ b/src/Schema/index.ts @@ -2,9 +2,9 @@ export * from "./Class" export * from "./DateTime" export * from "./encodedAsPrismaJsonValue" export * from "./Kind" -export * from "./makeJsonifiable" export * as MobX from "./MobX" export * from "./MutableClass" export * from "./MutableTaggedClass" export * from "./Tag" export * from "./TaggedClass" +export * from "./toJsonifiable" diff --git a/src/Schema/makeJsonifiable.ts b/src/Schema/toJsonifiable.ts similarity index 91% rename from src/Schema/makeJsonifiable.ts rename to src/Schema/toJsonifiable.ts index f1eadd7..0112b3e 100644 --- a/src/Schema/makeJsonifiable.ts +++ b/src/Schema/toJsonifiable.ts @@ -2,7 +2,7 @@ import { Schema } from "@effect/schema" import type { JsonValue } from "type-fest" -export const makeJsonifiable = < +export const toJsonifiable = < JsonifiableA, JsonifiableI extends JsonValue, JsonifiableR, diff --git a/src/tests.ts b/src/tests.ts index d345c5c..f1adbc7 100644 --- a/src/tests.ts +++ b/src/tests.ts @@ -1,7 +1,7 @@ import { Schema as S } from "@effect/schema" import { reaction, runInAction } from "mobx" import type { Simplify } from "type-fest" -import { makeJsonifiable, MutableTaggedClass } from "./Schema" +import { MutableTaggedClass, toJsonifiable } from "./Schema" import { ObservableClass } from "./Schema/MobX" import type { ExtendAll } from "./Types" @@ -26,7 +26,7 @@ class User extends MutableTaggedClass()("User", { ) {} const JsonifiableUser = User.pipe( - makeJsonifiable(S.Struct({ + toJsonifiable(S.Struct({ ...User.fields, id: S.BigInt, }))