Kind
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2024-06-27 18:28:13 +02:00
parent a49fa8763f
commit 6bf3c64f1b
2 changed files with 10 additions and 0 deletions

View File

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