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

invalid type signature for arcgisToGeoJSON #98

Open
tomwayson opened this issue Apr 11, 2023 · 4 comments
Open

invalid type signature for arcgisToGeoJSON #98

tomwayson opened this issue Apr 11, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tomwayson
Copy link

Seems like this line

export function arcgisToGeoJSON(arcgis: ArcGIS.Geometry, idAttribute?: string): GeoJSON.GeometryObject;

Should be:

export function arcgisToGeoJSON(arcgis: ArcGIS.Geometry | ArcGIS.Feature | ArcGIS.FeatureSet, idAttribute?: string): GeoJSON.GeometryObject;

Based on the description:

Param Type Description
JSON object The input ArcGIS geometry, feature or feature collection.
@jgravois
Copy link
Member

greetings old friend. 👋

a PR (to DefinitelyTyped) would most certainly be welcome.

@tomwayson
Copy link
Author

greetings indeed.

I did start on that, but the above change didn't solve the problem in my environment, likely due to mismatches between the "arcgis-rest-api" types and the corresponding types from @arcgis/core and I just ended up sprinkling as any through my code.

This made me wonder if the types for this library should be using the actual types from @arcgis/core, but that feels like a bigger issue.

@jgravois
Copy link
Member

i don't have any firm opinions about better Typescript support. this library is pretty mature/stable at this point so i'm not opposed to (someone else) tackling a full-blown revamp. i wouldn't expect it to be yeoman's work.

i'd also be fine with moving the typings here if it'd make maintenance easier. ❤️

@webmapLee

This comment was marked as off-topic.

@jgravois jgravois added enhancement New feature or request help wanted Extra attention is needed labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants