File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,15 +18,11 @@ import { clone } from "@turf/clone";
1818 * //addToMap
1919 * var addToMap = [pt, converted];
2020 */
21- function toMercator < G = AllGeoJSON | Position > (
21+ function toMercator < G extends AllGeoJSON | Position > (
2222 geojson : G ,
2323 options : { mutate ?: boolean } = { }
2424) : G {
25- return project (
26- geojson as GeoJSON | Position ,
27- convertToMercator ,
28- options
29- ) as G ;
25+ return project ( geojson , convertToMercator , options ) ;
3026}
3127
3228/**
@@ -44,11 +40,11 @@ function toMercator<G = AllGeoJSON | Position>(
4440 * //addToMap
4541 * var addToMap = [pt, converted];
4642 */
47- function toWgs84 < G = AllGeoJSON | Position > (
43+ function toWgs84 < G extends AllGeoJSON | Position > (
4844 geojson : G ,
4945 options : { mutate ?: boolean } = { }
5046) : G {
51- return project ( geojson as GeoJSON | Position , convertToWgs84 , options ) as G ;
47+ return project ( geojson , convertToWgs84 , options ) ;
5248}
5349
5450/**
You can’t perform that action at this time.
0 commit comments