polygon-clipping.d.ts 513 B

1234567891011
  1. declare module 'polygon-clipping' {
  2. export type Pair = [number, number];
  3. export type Ring = Pair[];
  4. export type Polygon = Ring[];
  5. export type MultiPolygon = Polygon[];
  6. type Geom = Polygon | MultiPolygon;
  7. export function intersection(geom: Geom, ...geoms: Geom[]): MultiPolygon;
  8. export function xor(geom: Geom, ...geoms: Geom[]): MultiPolygon;
  9. export function union(geom: Geom, ...geoms: Geom[]): MultiPolygon;
  10. export function difference(subjectGeom: Geom, ...clipGeoms: Geom[]): MultiPolygon;
  11. }