arangodb / arangojs

The official ArangoDB JavaScript driver.
https://arangodb.github.io/arangojs
Apache License 2.0
600 stars 106 forks source link

Generic Type on Raw Query response #764

Closed vitoladev closed 2 years ago

vitoladev commented 2 years ago

It would be great to have a generic type on database.query() method, passing a T generic to the ArrayCursor class.

Example:

 query<T = any>(query: AqlQuery, options?: QueryOptions): Promise<ArrayCursor<T>>;

I will send a PR with this feature, typescript types will be useful on raw queries, because it currently returns any type on every raw query.