@@ -13,6 +13,7 @@ import {
1313 geometryCollection ,
1414} from "@turf/helpers" ;
1515import { buffer } from "./index.js" ;
16+ import { Feature , Point , Polygon } from "geojson" ;
1617
1718const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
1819
@@ -34,14 +35,14 @@ test("turf-buffer", (t) => {
3435 fixtures . forEach ( ( fixture ) => {
3536 const filename = fixture . filename ;
3637 const name = fixture . name ;
37- const geojson = fixture . geojson ;
38- const properties = geojson . properties || { } ;
38+ const geojson = fixture . geojson as any ;
39+ const properties = ( geojson as Feature ) . properties || { } ;
3940 const radius = properties . radius || 50 ;
4041 const units = properties . units || "miles" ;
4142 const steps = properties . steps ;
4243
4344 const buffered = truncate (
44- buffer ( geojson , radius , { units : units , steps : steps } )
45+ buffer ( geojson , radius , { units : units , steps : steps } ) !
4546 ) ;
4647
4748 // Add Results to FeatureCollection
@@ -112,7 +113,7 @@ test("turf-buffer - Prevent Input Mutation", (t) => {
112113 [ 11 , 0 ] ,
113114 ] ,
114115 ] ) ;
115- const collection = featureCollection ( [ pt , poly ] ) ;
116+ const collection = featureCollection < Point | Polygon > ( [ pt , poly ] ) ;
116117
117118 const beforePt = JSON . parse ( JSON . stringify ( pt ) ) ;
118119 const beforePoly = JSON . parse ( JSON . stringify ( poly ) ) ;
@@ -182,7 +183,7 @@ test("turf-buffer - undefined return", (t) => {
182183 t . end ( ) ;
183184} ) ;
184185
185- function colorize ( feature , color ) {
186+ function colorize ( feature : Feature , color : string ) {
186187 color = color || "#F00" ;
187188 if ( feature . properties ) {
188189 feature . properties . stroke = color ;
0 commit comments