import { ts } from "ts-morph"; export interface MemberDetails { modifierFlags: ts.ModifierFlags; name: string; } export interface MethodDetails extends MemberDetails { returnType?: string; returnTypeIds?: string[]; } export interface PropertyDetails extends MemberDetails { type?: string; typeIds: string[]; optional: boolean; } export declare enum HeritageClauseType { Extends = 0, Implements = 1 } export interface HeritageClause { clause: string; clauseTypeId: string; className: string; classTypeId: string; type: HeritageClauseType; } export interface ClassOrIfOptions { name: string; id: string; properties: PropertyDetails[]; methods: MethodDetails[]; heritageClauses?: HeritageClause[]; } export interface FileDeclaration { /** * file name including path */ fileName: string; classes: Clazz[]; interfaces: Interface[]; enums: Enum[]; types: TypeAlias[]; heritageClauses: HeritageClause[][]; memberAssociations?: MemberAssociation[]; } export declare class NamedType { name: string; id: string; constructor(options: { name: string; id: string; }); getRelativeFilePath(fromFile?: string | null): string; } export declare class Interface extends NamedType { properties: PropertyDetails[]; methods: MethodDetails[]; heritageClauses: HeritageClause[]; constructor(options: ClassOrIfOptions); } export declare class TypeAlias extends Interface { } export declare class Clazz extends Interface { } export interface EnumOptions { name: string; id: string; enumItems: string[]; } export declare class Enum extends NamedType { items: string[]; constructor(options: EnumOptions); } export declare enum AssociationType { Association = 0 } export declare class MemberAssociation { readonly a: AssociationEnd; readonly b: AssociationEnd; readonly associationType: AssociationType; inerhited: boolean; constructor(a: AssociationEnd, b: AssociationEnd, associationType?: AssociationType, inerhited?: boolean); } export interface AssociationEnd { typeId: string; name: string; multiplicity?: "0..*" | undefined; }