Permalink
Browse files

add type for SweepContextOptions in poly2tri.d.ts

  • Loading branch information...
1 parent 7b76fe3 commit 3248cdba5e7e2b76021bd6a24d60fceb6554cadb @r3mi committed Apr 17, 2017
Showing with 19 additions and 3 deletions.
  1. +14 −2 src/poly2tri.d.ts
  2. +5 −1 tslint.json
View
@@ -154,13 +154,25 @@ export class Triangle {
}
+/**
+ * SweepContext constructor option
+ */
+export interface SweepContextOptions {
+ /**
+ * cloneArrays - if `true`, do a shallow copy of the Array parameters (contour, holes).
+ * Points inside arrays are never copied.
+ * Default is `false` : keep a reference to the array arguments, who will be modified in place.
+ */
+ cloneArrays?: boolean;
+}
+
+
/**
* Triangulation context
*/
export class SweepContext {
- constructor(contour: Array<XY>);
- constructor(contour: Array<XY>, options: JSON);
+ constructor(contour: Array<XY>, options?: SweepContextOptions);
public addHole(polyline: Array<XY>): SweepContext;
View
@@ -14,9 +14,13 @@
true,
2
],
+ "interface-name": [
+ false,
+ "always-prefix"
+ ],
"array-type": [
true,
"generic"
]
}
-}
+}

0 comments on commit 3248cdb

Please sign in to comment.