Initial commit
Some checks failed
Publish / publish (push) Failing after 14s
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-07-01 22:34:50 +02:00
commit 7524094a56
67 changed files with 3537 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { ThSchema } from "@thilawyn/thilaschema"
import { Schema } from "effect"
export class Todo extends Schema.Class<Todo>("Todo")({
_tag: Schema.tag("Todo"),
id: Schema.String,
content: Schema.String,
completedAt: Schema.OptionFromSelf(Schema.DateTimeUtcFromSelf),
}) {}
export const TodoFromJsonStruct = Schema.Struct({
...Todo.fields,
completedAt: Schema.Option(Schema.DateTimeUtc),
}).pipe(
ThSchema.assertEncodedJsonifiable
)
export const TodoFromJson = Schema.compose(TodoFromJsonStruct, Todo)

View File

@@ -0,0 +1 @@
export * as Todo from "./Todo"