@mocanvas/editor · type
type UnionValidatorConfig<Key extends string, Config> = {
readonly [Variant in keyof Config]: Validatable<Extract<Config[Variant], object> & {
readonly [K in Key]: Variant;
}>;
}The variant table a UnionValidator is built from: one validator per value of the discriminant.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.