@marianmeres/dtokit@1.0.6
A generic, type-safe factory for working with discriminated unions in TypeScript.
Union of all DTO types that match the discriminator pattern.
Creates a DTO factory for a specific schema set and discriminator field.
Creates a switch-style handler that exhaustively handles all DTO types.
Gets all schema keys that have a literal value for the discriminator field.
Union of all discriminator values (literal strings) for a given field.
Builds a map from discriminator values to their corresponding types.
Type definition for exhaustive switch-style handlers.
Extracts the literal string value of a discriminator field from a type.
Filters types that have a literal (non-generic) string value for the given field.
Returns never if the field doesn't exist or is a generic string type.