0.1.1 (#2)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://git.jvalver.de/Thilawyn/thilalib/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
9
src/effect/schema/Tag.ts
Normal file
9
src/effect/schema/Tag.ts
Normal 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,
|
||||
)
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
export { Jsonifiable } from "./Jsonifiable"
|
||||
export { Tag } from "./Tag"
|
||||
|
||||
Reference in New Issue
Block a user