Installation
npm install --save @types/cytoscape-dagre
Summary
This package contains type definitions for cytoscape-dagre (https://github.com/cytoscape/cytoscape.js-dagre).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cytoscape-dagre.
import cytoscape = require("cytoscape");
declare const cytoscapeDagre: cytoscape.Ext;
export = cytoscapeDagre;
export as namespace cytoscapeDagre;
declare namespace cytoscapeDagre {
type EdgeAssessmentFunction = (edge: cytoscape.EdgeSingular) => number;
type AnimationFilterFunction = (node: cytoscape.NodeSingular, i: number) => boolean;
type TransformFunction = (node: cytoscape.NodeSingular, pos: cytoscape.Position) => cytoscape.Position;
interface DagreLayoutOptions extends cytoscape.ShapedLayoutOptions {
name: "dagre";
nodeSep?: number | undefined;
edgeSep?: number | undefined;
rankSep?: number | undefined;
rankDir?: "TB" | "LR" | undefined;
ranker?: "network-simplex" | "tight-tree" | "longest-path" | undefined;
minLen?: EdgeAssessmentFunction | undefined;
edgeWeight?: EdgeAssessmentFunction | undefined;
animateFilter?: AnimationFilterFunction | undefined;
transform?: TransformFunction | undefined;
}
}
Additional Details
Credits
These definitions were written by Felix Barczewicz.