@rnaga/wp-node
Version:
👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**
16 lines (12 loc) • 410 B
TypeScript
import * as val from "../validators";
import { z } from "zod";
export type Parser = {
parse: (v: any, ...args: any) => any;
safeParse: (v: any, ...args: any) => any;
};
export type ParserReturnType<T> = T extends Parser
? ReturnType<T["parse"]>
: any;
export type Tables = keyof typeof val.database.wpTables;
export type Field<T extends Tables> =
keyof (typeof val.database.wpTables)[T]["shape"];