Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

point() no longer throws if given invalid args #1941

Closed
diachedelic opened this issue Sep 9, 2020 · 2 comments · Fixed by #1964
Closed

point() no longer throws if given invalid args #1941

diachedelic opened this issue Sep 9, 2020 · 2 comments · Fixed by #1964

Comments

@diachedelic
Copy link

As of v6.2.0-alpha.2, you can pass @turf/helper's point function literally anything and it will not complain. This a breaking change for me - if it's intentional could it be mentioned in the changelog?

import { point } from "@turf/helpers";
point("hello");
// {
//  type: 'Feature',
//  properties: {},
//  geometry: { type: 'Point', coordinates: 'hello' }
// }
@mfedderly
Copy link
Collaborator

Looks like this got dropped when helpers was converted to Typescript. Typescript would catch errors like this at compile time, but obviously not all of our consumers are using Typescript.

@diachedelic
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants