UNPKG

pg-to-ts

Version:

Generate TypeScript-friendly interfaces and constants from (postgres) SQL database schema

17 lines (16 loc) 595 B
export type OptionValues = { camelCase?: boolean; /** Leave date, timestamp, and timestamptz columns as strings, rather than Dates. */ datesAsStrings?: boolean; writeHeader?: boolean; /** Import types for jsdoc-tagged JSON columns from this path */ jsonTypesFile?: string; /** Prefix the tablenames with the schema name. */ prefixWithSchemaNames?: boolean; }; export default class Options { options: OptionValues; constructor(options?: OptionValues); transformTypeName(typename: string): string; transformColumnName(columnName: string): string; }