Esri / arcgis-rest-js

compact, modular JavaScript wrappers for the ArcGIS REST API
https://developers.arcgis.com/arcgis-rest-js/
Apache License 2.0
347 stars 119 forks source link

ISearchResults.results displays incorrectly #548

Open patrickarlt opened 5 years ago

patrickarlt commented 5 years ago

Displays as IItem[] | IGroup[] | IItem | IGroup should display as only IItem[] | IGroup[]

https://esri.github.io/arcgis-rest-js/api/portal/searchItems/#results

green3g commented 4 years ago

I'm getting this error:

Property 'results' does not exist on type 'ISearchResult<IItem> | {}'.
  Property 'results' does not exist on type '{}'.ts(2339)

when running this code:

const {features} = await searchItems(...);

I think this might be related to this. Not sure is there a workaround?

abxhr commented 2 years ago

I would love to fix this! 🙋‍♂️

To clarify, IItem[] | IGroup[] | IUser[] | IItem | IGroup | IUser in https://esri.github.io/arcgis-rest-js/api/portal/searchItems/#results should just be IItem[] | IGroup[] | IUser[]?