forked from mdaines/viz-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
36 lines (30 loc) · 898 Bytes
/
index.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
declare var Viz: VizJs.Viz
export default Viz
declare namespace VizJs {
interface Viz {
(src: string, opts?: VizOpts): string | HTMLImageElement
svgXmlToPngImageElement(svgXml: string, scale: number | undefined, callback: ImageCallback): void
svgXmlToPngImageElement(svgXml: string, scale?: number): HTMLImageElement
svgXmlToPngBase64(svgXml: string, scale: number | undefined, callback: ImageCallback): void
}
interface ImageCallback {
(error: Error | null, image: HTMLImageElement): void
}
interface VizOpts {
format?: string
engine?: string
scale?: number
images?: Image[]
totalMemory?: number,
files?: File[]
}
interface File {
path: string
data: string
}
interface Image {
href: string
height: string
width: string
}
}