Skip to content

Commit

Permalink
types(layout.DirectedGraph): capitalize interface names (#2784)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumilingus authored Nov 5, 2024
1 parent 66ab6b7 commit 0a100fc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/joint-layout-directed-graph/DirectedGraph.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 0a100fc

Please sign in to comment.