From 0a100fca462604a96ebe3b5ce380d08da03e528f Mon Sep 17 00:00:00 2001 From: Roman Bruckner Date: Tue, 5 Nov 2024 13:11:25 +0100 Subject: [PATCH] types(layout.DirectedGraph): capitalize interface names (#2784) --- .../joint-layout-directed-graph/DirectedGraph.d.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/joint-layout-directed-graph/DirectedGraph.d.ts b/packages/joint-layout-directed-graph/DirectedGraph.d.ts index c56c217f1..c6472823b 100644 --- a/packages/joint-layout-directed-graph/DirectedGraph.d.ts +++ b/packages/joint-layout-directed-graph/DirectedGraph.d.ts @@ -43,21 +43,27 @@ export namespace DirectedGraph { exportLink?: (link: dia.Link) => Edge; } - interface toGraphLibOptions extends ExportOptions { + interface ToGraphLibOptions extends ExportOptions { [key: string]: any; } - interface fromGraphLibOptions extends ImportOptions { + interface FromGraphLibOptions extends ImportOptions { graph?: dia.Graph; [key: string]: any; } export function layout(graph: dia.Graph | dia.Cell[], opt?: LayoutOptions): g.Rect; - export function toGraphLib(graph: dia.Graph, opt?: toGraphLibOptions): any; + export function toGraphLib(graph: dia.Graph, opt?: ToGraphLibOptions): any; - export function fromGraphLib(glGraph: any, opt?: fromGraphLibOptions): dia.Graph; + export function fromGraphLib(glGraph: any, opt?: FromGraphLibOptions): dia.Graph; // @deprecated pass the `graph` option instead export function fromGraphLib(this: dia.Graph, glGraph: any, opt?: { [key: string]: any }): dia.Graph; + + // @deprecated use `FromGraphLibOptions` instead + type fromGraphLibOptions = FromGraphLibOptions; + + // @deprecated use `ToGraphLibOptions` instead + type toGraphLibOptions = ToGraphLibOptions; }