9 lines
216 B
TypeScript
9 lines
216 B
TypeScript
import { Schema } from "@effect/schema"
|
|
|
|
|
|
export const Kind = <Kind extends string>(kind: Kind) =>
|
|
Schema.withConstructorDefault(
|
|
Schema.propertySignature(Schema.Literal(kind)),
|
|
() => kind,
|
|
)
|