0.1.12 (#13)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: #13
This commit was merged in pull request #13.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thilawyn/thilalib",
|
"name": "@thilawyn/thilalib",
|
||||||
"version": "0.1.11",
|
"version": "0.1.12",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"./dist"
|
"./dist"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
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"
|
||||||
@@ -8,3 +7,4 @@ export * from "./MutableClass"
|
|||||||
export * from "./MutableTaggedClass"
|
export * from "./MutableTaggedClass"
|
||||||
export * from "./Tag"
|
export * from "./Tag"
|
||||||
export * from "./TaggedClass"
|
export * from "./TaggedClass"
|
||||||
|
export * from "./toJsonifiable"
|
||||||
|
|||||||
@@ -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 toJsonifiable = <
|
||||||
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 { MutableTaggedClass, toJsonifiable } 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({
|
toJsonifiable(S.Struct({
|
||||||
...User.fields,
|
...User.fields,
|
||||||
id: S.BigInt,
|
id: S.BigInt,
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user