diff --git a/package.json b/package.json index 3a223de..ff8ff21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@thilawyn/thilalib", - "version": "0.1.11", + "version": "0.1.12", "type": "module", "files": [ "./dist" diff --git a/src/Schema/index.ts b/src/Schema/index.ts index 0342e44..b047a9e 100644 --- a/src/Schema/index.ts +++ b/src/Schema/index.ts @@ -1,5 +1,4 @@ export * from "./Class" -export * from "./composeJsonifiable" export * from "./DateTime" export * from "./encodedAsPrismaJsonValue" export * from "./Kind" @@ -8,3 +7,4 @@ export * from "./MutableClass" export * from "./MutableTaggedClass" export * from "./Tag" export * from "./TaggedClass" +export * from "./toJsonifiable" diff --git a/src/Schema/composeJsonifiable.ts b/src/Schema/toJsonifiable.ts similarity index 91% rename from src/Schema/composeJsonifiable.ts rename to src/Schema/toJsonifiable.ts index 0599622..0112b3e 100644 --- a/src/Schema/composeJsonifiable.ts +++ b/src/Schema/toJsonifiable.ts @@ -2,7 +2,7 @@ import { Schema } from "@effect/schema" import type { JsonValue } from "type-fest" -export const composeJsonifiable = < +export const toJsonifiable = < JsonifiableA, JsonifiableI extends JsonValue, JsonifiableR, diff --git a/src/tests.ts b/src/tests.ts index cf38378..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 { composeJsonifiable, 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( - composeJsonifiable(S.Struct({ + toJsonifiable(S.Struct({ ...User.fields, id: S.BigInt, }))