UNPKG

typeorm-erd

Version:

Create ERD from TypeORM with outputs as Mermaid, or PlantUML

21 lines (20 loc) 638 B
import { DataSource, EntityMetadata } from "typeorm"; import { RelationType } from "typeorm/metadata/types/RelationTypes"; export declare type BuilderRelations = Record<string, { entityRelations: RelationData[]; }>; interface RelationData { relationType: RelationType; propertyPath: string; nullable: boolean; isOwning: boolean; inverseSidePropertyPath: string; source: string; target: string; joinTableName: string; } export declare const builders: { entityMetaData: (connection: DataSource) => Promise<EntityMetadata[]>; relations: (meta: EntityMetadata[]) => BuilderRelations; }; export {};