Effect CommunityEC
Effect Community2y ago
3 replies
BinaryArtifex

Extending a Literal Schema in TypeScript

given an already existing Schema of string literals, is there a way to create a new literal schema that uses the old list of literals as a base?

export const BaseLiterals = Schema.literal("foo, "bar");

//somewhere else in the codebase - how can i add the literal "baz" below?
export const TargetLiterals = BaseLiterals.pipe(...)
Was this page helpful?