File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/turf-line-offset Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function lineOffset<T extends LineString | MultiLineString>(
3232 geojson : Feature < T > | T ,
3333 distance : number ,
3434 options : { units ?: Units } = { }
35- ) {
35+ ) : Feature < T > {
3636 // Optional parameters
3737 options = options || { } ;
3838 if ( ! isObject ( options ) ) throw new Error ( "options is invalid" ) ;
@@ -48,15 +48,15 @@ function lineOffset<T extends LineString | MultiLineString>(
4848
4949 switch ( type ) {
5050 case "LineString" :
51- return lineOffsetFeature ( geojson , distance , units ) ;
51+ return lineOffsetFeature ( geojson , distance , units ) as Feature < T > ;
5252 case "MultiLineString" :
5353 var coords : Position [ ] [ ] = [ ] ;
5454 flattenEach ( geojson , function ( feature ) {
5555 coords . push (
5656 lineOffsetFeature ( feature , distance , units ) . geometry . coordinates
5757 ) ;
5858 } ) ;
59- return multiLineString ( coords , properties ) ;
59+ return multiLineString ( coords , properties ) as Feature < T > ;
6060 default :
6161 throw new Error ( "geometry " + type + " is not supported" ) ;
6262 }
You can’t perform that action at this time.
0 commit comments