Tag
All checks were successful
Lint / lint (push) Successful in 13s

This commit is contained in:
Julien Valverdé
2024-06-22 05:04:10 +02:00
parent b0b472e2b2
commit 3b662d0b5f
2 changed files with 10 additions and 0 deletions

9
src/effect/schema/Tag.ts Normal file
View File

@@ -0,0 +1,9 @@
import { Schema as S } from "@effect/schema"
export function Tag<Tag extends string>(tag: Tag) {
return S.withConstructorDefault(
S.propertySignature(S.Literal(tag)),
() => tag,
)
}

View File

@@ -1 +1,2 @@
export { Jsonifiable } from "./Jsonifiable"
export { Tag } from "./Tag"