-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
triageHas to be reviewed by maintainersHas to be reviewed by maintainers
Description
Is your feature request related to a problem? Please describe.
The current nominal-typebox implementation is fragile because it copies a lot of Typebox code as-is just to replace the static field
Describe the solution you'd like
Since nominal-typebox was written, a new feature called Type.Unsafe was added to Typebox which allows easily overriding the static property without having to do copy a bunch of Typebox internals like this library does now
For example, in my code instead of using nomial-typebox I just do
import type { FastFlavor } from "@coderspirit/nominal";
export type HexStringNo0x = FastFlavor<string, 'HexStringNo0x'>;
// this gives the same result as the nomial-typebox library, but with no dependency required
const HexStringNo0xTypebox = Type.Unsafe<HexStringNo0x>(Type.RegExp(/^[a-fA-F0-9]+$/)),castarco
Metadata
Metadata
Assignees
Labels
triageHas to be reviewed by maintainersHas to be reviewed by maintainers