UNPKG

@tsclean/core

Version:

Plugin for API Rest Full development, based on Clean Architecture, IoC and Dependency Injection.

53 lines 2.09 kB
import { InjectionToken } from '../contracts'; import { Edge } from './contracts/edge'; import { Entrypoint } from './contracts/entrypoint'; import { OrphanedEnhancerDefinition } from './contracts/extras'; import { Node } from './contracts/node'; import { SerializedGraphMetadata } from './contracts/serialized-graph-metadata'; import { SerializedGraphJson } from './contracts/serialized-graph-json'; export type SerializedGraphStatus = 'partial' | 'complete'; type WithOptionalId<T extends Record<'id', string>> = Omit<T, 'id'> & Partial<Pick<T, 'id'>>; export declare class SerializedGraph { private readonly nodes; private readonly edges; private readonly entrypoints; private readonly extras; private _status; private _metadata?; private static readonly INTERNAL_PROVIDERS; set status(status: SerializedGraphStatus); set metadata(metadata: SerializedGraphMetadata); insertNode(nodeDefinition: Node): Node; insertEdge(edgeDefinition: WithOptionalId<Edge>): { id: string; source: string; target: string; metadata: ({ type: "module-to-module"; } & { sourceModuleName: string; targetModuleName: string; }) | ({ type: "class-to-class"; sourceClassName: string; targetClassName: string; sourceClassToken: InjectionToken; targetClassToken: InjectionToken; injectionType: "constructor" | "property" | "decorator"; keyOrIndex?: string | number | symbol; internal?: boolean; } & { sourceModuleName: string; targetModuleName: string; }); }; insertEntrypoint<T>(definition: Entrypoint<T>, parentId: string): void; insertOrphanedEnhancer(entry: OrphanedEnhancerDefinition): void; insertAttachedEnhancer(nodeId: string): void; getNodeById(id: string): Node; toJSON(): SerializedGraphJson; toString(): string; private generateUuidByEdgeDefinition; } export {}; //# sourceMappingURL=serialized-graph.d.ts.map