P.infer<typeof somePattern> will return the type of the value matched by this pattern.
P.infer<typeof somePattern>
Read the documentation for P.infer on GitHub
P.infer
const userPattern = { name: P.string }type User = P.infer<typeof userPattern> Copy
const userPattern = { name: P.string }type User = P.infer<typeof userPattern>
P.infer<typeof somePattern>
will return the type of the value matched by this pattern.Read the documentation for
P.infer
on GitHub