From c0433a8c7673d3ca3a0353d16e4f66b8bf0ff6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Tue, 20 Aug 2024 23:44:13 +0200 Subject: [PATCH] 0.1.12 (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julien Valverdé Reviewed-on: https://git.valverde.cloud/Thilawyn/thilalib/pulls/13 --- package.json | 2 +- src/Schema/index.ts | 2 +- src/Schema/{composeJsonifiable.ts => toJsonifiable.ts} | 2 +- src/tests.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/Schema/{composeJsonifiable.ts => toJsonifiable.ts} (91%) 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, }))