1+ declare module 'polybooljs' {
2+ type Polygon = {
3+ regions : number [ ] [ ] [ ] ;
4+ inverted : boolean ;
5+ }
6+
7+ type Segment = {
8+ segments : Segment [ ] ,
9+ inverted : boolean ;
10+ }
11+
12+ type GeoJSON = {
13+ type : string ;
14+ geopolys : Polygon [ ] ;
15+ }
16+
17+ export default interface PolyBool {
18+ /**
19+ * Getter/setter for buildLog
20+ */
21+ buildLog : ( bl : boolean ) => object [ ] | boolean ,
22+ /**
23+ * Getter/setter for epsilon
24+ */
25+ epsilon : ( value : number ) => number ,
26+ segments : ( poly : Polygon ) => Segment ,
27+ combine : ( segment1 : Segment , segment2 : Segment ) => {
28+ combined : object ;
29+ inverted1 : boolean ;
30+ inverted2 : boolean ;
31+ } ,
32+ selectUnion : ( combined : object ) => Segment ,
33+ selectIntersect : ( combined : object ) => Segment ,
34+ selectDifference : ( combined : object ) => Segment ,
35+ selectDifferenceRev : ( combined : object ) => Segment ,
36+ selectXor : ( combined : object ) => Segment ,
37+ polygon : ( segments : Segment ) => Polygon ,
38+ polygonFromGeoJSON : ( geojson : GeoJSON ) => Polygon ,
39+ polygonToGeoJSON : ( poly : Polygon ) => GeoJSON ,
40+ union : ( poly1 : Polygon , poly2 : Polygon ) => Polygon ,
41+ intersect : ( poly1 : Polygon , poly2 : Polygon ) => Polygon ,
42+ difference : ( poly1 : Polygon , poly2 : Polygon ) => Polygon ,
43+ differenceRev : ( poly1 : Polygon , poly2 : Polygon ) => Polygon ,
44+ xor : ( poly1 : Polygon , poly2 : Polygon ) => Polygon
45+ }
46+ }
0 commit comments