pure-parse
v0.0.0-beta.6
Published
Strongly typed validation library that decouples type aliases from validation logic
Downloads
2,523
Maintainers
Readme
Declare the type:
type User = {
id: number
name: string
}
const parseUser = object<User>({
id: parseNumber,
name: parseString,
})
...or infer the type:
const parseUser = object({
id: parseNumber,
name: parseString,
})
type User = Infer<typeof parseUser>