type GeneratedType = { /** Type fields. */ entries: TypeField[]; }; type Tags = Record; type ReturnField = { /** Function return type. */ type: string; }; type GeneratedDefinition = { /** * Where type definition is located on disk. */ filePath?: string; /** * Definition name. */ name: string; /** * Definition description. */ description?: string; /** * [TSDoc tags](https://tsdoc.org/pages/spec/tag_kinds). */ tags?: Tags; }; type GeneratedFunction = { signatures: { /** Function parameters. */ params: TypeField[]; /** Function return. */ returns: TypeField[] | ReturnField; }[]; }; type TypeField = { /** Field name. */ name: string; /** Field type. */ type: string; /** Field description. */ description?: string; /** Is field optional. */ optional?: boolean; /** Field tags. */ tags?: Tags; }; type BaseArgs = { /** TypeScript source code to be processed. */ code: string; /** * The name of the exported declaration. * @default "default" */ exportName?: string; /** * Whether to flatten nested objects. * E.g. `{ foo: { bar: string } }` will be represented as: `{ foo.bar: string }` * @default false */ flattened?: boolean; }; export type { BaseArgs, GeneratedDefinition, GeneratedFunction, GeneratedType, ReturnField, Tags, TypeField };