schema/index.ts
Florian Bouillon 817b7d6774
0.0.2
Signed-off-by: Avior <git@avior.me>
2025-03-25 13:54:46 +01:00

13 lines
198 B
TypeScript

import { Infer, s } from '.'
const res = new s({
a: s.object({
p: s.string()
})
})
type Infered = Infer<typeof res>
type Test = Infered['a']['p']
console.log(res.parse("{ hello: 'world' }"))