Closed xddq closed 1 year ago
uses prettier (with default config) as formatter for the generated typescript code. Will probably add ability to pass custom config somewhat later.
// Arbitrary example types export type Address = { street: string; test: { a: string; }; }; export type Address2 = { street2: Address["test"]["a"]; };
yarn build && yarn start
import { Type, Static } from "@sinclair/typebox"; export type Address = Static<typeof Address>; export const Address = Type.Object({ street: Type.String(), test: Type.Object({ a: Type.String(), }), }); export type Address2 = Static<typeof Address2>; export const Address2 = Type.Object({ street2: Type.String(), });
uses prettier (with default config) as formatter for the generated typescript code. Will probably add ability to pass custom config somewhat later.
how to test
yarn build && yarn start