Add typings to GeometryFactory in jsts. (#40997)

Add createLinearRing and createPolygon. These classes are already defined in typings.
This commit is contained in:
Roop Pal
2019-12-13 09:22:57 +00:00
committed by Orta
parent 8a20cf059d
commit 1637adbb91
+17
View File
@@ -77,6 +77,23 @@ declare namespace jsts {
* @return {Point} A new Point.
*/
createPoint(coordinates: Coordinate): Point;
/**
* Creates a LinearRing using the given Coordinates; a null or empty array
* will create an empty LinearRing. Consecutive points must not be equal.
*
* @param {Coordinate[]}
* coordinates an array without null elements, or an empty array,
* or null.
* @return {LineString} A new LinearRing.
*/
createLinearRing(coordinates: Array<Coordinate>): LinearRing;
/**
* Creates a Polygon using the given LinearRing.
*
* @param {LinearRing} A LinearRing constructed by coordinates.
* @return {Polygon} A new Polygon.
*/
createPolygon(shell: LinearRing, holes: Array<LinearRing>): Polygon;
}