schema2typebox
Version:
Creates typebox code from JSON schemas
17 lines (16 loc) • 477 B
TypeScript
export type Schema2TypeboxOptions = {
/**
* The given JSON schema as utf-8 encoded string.
*/
input: string;
};
/**
* 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, }: Schema2TypeboxOptions) => Promise<string>;
export declare const addCommentThatCodeIsGenerated: (code: string) => string;