From a07b85a68ffbc759abb2e45f880dc4d3ee107d72 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 13:02:14 +0100 Subject: [PATCH] Added more definitions --- types/d3-graphviz/index.d.ts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 7fdd4b2244..d29861a500 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -1,10 +1,11 @@ -import { IEdgeOptions, IGraphviz, INodeOptions } from './index.d'; // Type definitions for d3-graphviz 2.6 // Project: https://github.com/magjac/d3-graphviz // Definitions by: Dom Parfitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { ZoomBehavior } from 'd3-zoom' +import { Selection } from 'd3-selection' + /** * @@ -56,7 +57,7 @@ export interface IGraphviz { engine(engine: string): IGraphviz; addImage(path: string, width: number, height: number): IGraphviz; totalMemory(size: number): IGraphviz; - keyMode(keyMode: any): any; + keyMode(keyMode: string): IGraphviz; fade(enable: boolean): IGraphviz; tweenPaths(enable: boolean): IGraphviz; tweenShapes(enable: boolean): IGraphviz; @@ -70,9 +71,9 @@ export interface IGraphviz { zoomScaleExtent(extent: number[]): IGraphviz; zoomTranslateExtent(extent: number[][]): IGraphviz; render(callback: Function): IGraphviz; - dot: any; + dot(src: any, callback: () => void): any; data(): any; - renderDot(src: string, callback: any): any; + renderDot(src: string, callback: any): IGraphviz; transition: any; active(name: any): any; options(options: IGraphvizOptions | undefined): IGraphviz; @@ -80,20 +81,20 @@ export interface IGraphviz { height(height: number): IGraphviz; scale(scale: number): IGraphviz; fit(fit: boolean): IGraphviz; - attributer: any; + attributer(callback: any): any; on(typenames: string, callback: () => void): any; - onerror: any; + onerror(callback: any): any; logEvents(enable: boolean): IGraphviz; drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; - insertDrawnEdge: any; - removeDrawnEdge: any; + insertDrawnEdge(name: string): IGraphviz; + removeDrawnEdge(): IGraphviz; drawnEdgeSelection(): any; drawNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; updateDrawnNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; - inserDrawnNode: any; - removeDrawnNode: any; - drawnNodeSelection(): any; + inserDrawnNode(nodeId: string): IGraphviz; + removeDrawnNode(): IGraphviz; + drawnNodeSelection(): Selection; } \ No newline at end of file