Sovereign 8s.is mirror of standardgalactic/leukocyte
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .vscode | ||
| src | ||
| .gitignore | ||
| build_npm.ts | ||
| deno.json | ||
| deno.lock | ||
| import_map.json | ||
| LICENSE | ||
| logo.svg | ||
| README copy.md | ||
| README.md | ||
leukocyte
Customizable validation with type inference
Partial credit for the library name
leukocytegoes to:
TODO
- Add tests
- Add documentation
- infer
optional/nullableprop types no matter where they are in the method chain. Currently, they only work if defined after the type specific methods.- I have tried this:
readonly props: Props & { readonly optional: unknown extends Props[ 'optional' ] ? boolean | undefined : Props[ 'optional' ] readonly nullable: unknown extends Props[ 'nullable' ] ? boolean | undefined : Props[ 'nullable' ] } - filter out props that are not valid for the baseType