turf icon indicating copy to clipboard operation
turf copied to clipboard

segmentEach callback args typed as nullable

Open graue opened this issue 1 year ago • 1 comments

The TypeScript types for segmentEach in @turf/meta have all the arguments to the callback as nullable, but it doesn't appear from either the docs or the code that they can ever be null. This makes it necessary to write pointless checks for undefined to get my code to typecheck.

Using Turf 7.1.0; this is still the case in latest master.

graue avatar Aug 29 '24 07:08 graue