UNPKG

@paima/schema2typebox

Version:

Creates typebox code from JSON schemas

21 lines (20 loc) 578 B
export type Schema2TypeboxOptions = { /** * The given JSON schema as utf-8 encoded string. */ input: string | string[]; /** * Cleanup protobuf generated input */ protobuf?: boolean; }; /** * Use this function for programmatic usage of schema2typebox. The options are * typed and commented. * * @returns The generated code as string * * @throws Error **/ export declare const schema2typebox: ({ input, protobuf, }: Schema2TypeboxOptions) => Promise<string>; export declare const addCommentThatCodeIsGenerated: (code: string) => string;