This commit is contained in:
@@ -44,6 +44,6 @@
|
||||
"react": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@effect/language-service": "^0.23.3"
|
||||
"@effect/language-service": "^0.35.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,42 +11,37 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@effect/language-service": "^0.23.4",
|
||||
"@eslint/js": "^9.26.0",
|
||||
"@tanstack/react-router": "^1.120.3",
|
||||
"@tanstack/react-router-devtools": "^1.120.3",
|
||||
"@tanstack/router-plugin": "^1.120.3",
|
||||
"@thilawyn/thilaschema": "^0.1.4",
|
||||
"@types/react": "^19.1.4",
|
||||
"@types/react-dom": "^19.1.5",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"eslint": "^9.26.0",
|
||||
"@effect/language-service": "^0.35.2",
|
||||
"@eslint/js": "^9.34.0",
|
||||
"@tanstack/react-router": "^1.131.27",
|
||||
"@tanstack/react-router-devtools": "^1.131.27",
|
||||
"@tanstack/router-plugin": "^1.131.27",
|
||||
"@types/react": "^19.1.11",
|
||||
"@types/react-dom": "^19.1.7",
|
||||
"@vitejs/plugin-react": "^5.0.1",
|
||||
"eslint": "^9.34.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.1.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript-eslint": "^8.32.1",
|
||||
"vite": "^6.3.5"
|
||||
"globals": "^16.3.0",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"typescript-eslint": "^8.40.0",
|
||||
"vite": "^7.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@effect/platform": "^0.82.1",
|
||||
"@effect/platform-browser": "^0.62.1",
|
||||
"@effect/platform": "^0.90.6",
|
||||
"@effect/platform-browser": "^0.70.0",
|
||||
"@radix-ui/themes": "^3.2.1",
|
||||
"@typed/async-data": "^0.13.1",
|
||||
"@typed/id": "^0.17.2",
|
||||
"@typed/lazy-ref": "^0.3.3",
|
||||
"effect": "^3.15.1",
|
||||
"effect": "^3.17.9",
|
||||
"effect-fc": "workspace:*",
|
||||
"lucide-react": "^0.510.0",
|
||||
"mobx": "^6.13.7",
|
||||
"react-icons": "^5.5.0"
|
||||
},
|
||||
"overrides": {
|
||||
"effect": "^3.15.1",
|
||||
"@effect/platform": "^0.82.1",
|
||||
"@effect/platform-browser": "^0.62.1",
|
||||
"@typed/lazy-ref": "^0.3.3",
|
||||
"@typed/async-data": "^0.13.1"
|
||||
"@types/react": "^19.1.11",
|
||||
"effect": "^3.17.9",
|
||||
"react": "^19.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ThSchema } from "@thilawyn/thilaschema"
|
||||
import { assertEncodedJsonifiable } from "@/lib/schema"
|
||||
import { Schema } from "effect"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export const TodoFromJsonStruct = Schema.Struct({
|
||||
...Todo.fields,
|
||||
completedAt: Schema.Option(Schema.DateTimeUtc),
|
||||
}).pipe(
|
||||
ThSchema.assertEncodedJsonifiable
|
||||
assertEncodedJsonifiable
|
||||
)
|
||||
|
||||
export const TodoFromJson = Schema.compose(TodoFromJsonStruct, Todo)
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * from "./datetime"
|
||||
export * from "./json"
|
||||
|
||||
6
packages/example/src/lib/schema/json.ts
Normal file
6
packages/example/src/lib/schema/json.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { Schema } from "effect"
|
||||
import type { JsonValue } from "type-fest"
|
||||
|
||||
|
||||
export const assertEncodedJsonifiable = <S extends Schema.Schema<A, I, R>, A, I extends JsonValue, R>(schema: S & Schema.Schema<A, I, R>): S => schema
|
||||
export const assertTypeJsonifiable = <S extends Schema.Schema<A, I, R>, A extends JsonValue, I, R>(schema: S & Schema.Schema<A, I, R>): S => schema
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TextFieldInput } from "@/lib/TextFieldInput"
|
||||
import { TextFieldInput } from "@/lib/input/TextFieldInput"
|
||||
import { runtime } from "@/runtime"
|
||||
import { Container, TextField } from "@radix-ui/themes"
|
||||
import { Container } from "@radix-ui/themes"
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { Schema, SubscriptionRef } from "effect"
|
||||
import { Component, Memo } from "effect-fc"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as Domain from "@/domain"
|
||||
import { TextAreaInput } from "@/lib/input/TextAreaInput"
|
||||
import { TextFieldInput } from "@/lib/input/TextFieldInput"
|
||||
import { DateTimeUtcFromZonedInput } from "@/lib/schema"
|
||||
import { TextAreaInput } from "@/lib/TextAreaInput"
|
||||
import { TextFieldInput } from "@/lib/TextFieldInput"
|
||||
import { Box, Button, Flex, IconButton } from "@radix-ui/themes"
|
||||
import { GetRandomValues, makeUuid4 } from "@typed/id"
|
||||
import { Chunk, DateTime, Effect, Match, Option, Ref, Runtime, Schema, Stream, SubscriptionRef } from "effect"
|
||||
|
||||
Reference in New Issue
Block a user