Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leukocyte

Customizable validation with type inference

Partial credit for the library name leukocyte goes to:

TODO

  • Add tests
  • Add documentation
  • infer optional/nullable prop 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

About

Customizable validation with type inference

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages