forked from nathancahill/split
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
36 lines (31 loc) · 1.01 KB
/
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
/* use it like this:
import Split = require('split.js');
Split(['#a', '#b'], {
gutterSize: 8,
cursor: 'col-resize'
});
*/
declare module 'split.js' {
interface SplitOptions {
sizes?: number[];
minSize?: number[] | number;
gutterSize?: number;
snapOffset?: number;
direction?: "horizontal" | "vertical";
cursor?: "col-resize" | "row-resize";
gutter?: (index: number, direction: string) => HTMLElement;
elementStyle?: (dimension: string, elementSize: number, gutterSize: number) => any;
gutterStyle?: (dimension: string, gutterSize: number) => any;
onDrag?: () => void;
onDragStart?: () => void;
onDragEnd?: () => void;
}
interface SplitObject {
setSizes: (sizes: number[]) => void;
getSizes: () => number[];
collapse: (index: number) => void;
destroy: () => void;
}
function Split(elements: HTMLElement | string[], options?: SplitOptions): SplitObject;
export = Split;
}