-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
45 lines (39 loc) · 1.34 KB
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
declare module '*.scss' {
const content: { [className: string]: string };
export default content;
}
interface HTMLElement {
scrollIntoViewIfNeeded: () => void
}
declare module "react-cytoscapejs" {
import cytoscape, { NodeDataDefinition, EdgeDataDefinition } from "cytoscape";
import { Stylesheet, LayoutOptions, ElementDefinition } from "cytoscape";
import { FC, CSSProperties } from "react";
type CytoscapeComponentProps = {
id?: string;
cy?: (cy: cytoscape.Core) => void;
style?: CSSProperties | (() => { selector: (sel: 'node' | 'edge') => { style: (props: CSSProperties) => void } });
elements: ElementDefinition[];
layout?: LayoutOptions;
stylesheet?: Stylesheet | Stylesheet[] | string;
className?: string;
zoom?: number;
pan?: Position;
minZoom?: number;
maxZoom?: number;
zoomingEnabled?: boolean;
userZoomingEnabled?: boolean;
boxSelectionEnabled?: boolean;
autolock?: boolean;
autoungrabify?: boolean;
autounselectify?: boolean;
};
interface CytoscapeComponentInterface extends FC<CytoscapeComponentProps> {
//static normalizeElements(data: {
// nodes: ElementDefinition[];
// edges: ElementDefinition[];
//} | ElementDefinition[]): ElementDefinition[];
}
const CytoscapeComponent: CytoscapeComponentInterface;
export = CytoscapeComponent;
}