Skip to content

Commit 180c1b0

Browse files
committed
Fixed default query return type
In the absence of the seemingly redundant `| any` TS will infer the type parameter to be regardless of what the default type says. This behavior is consistent across all recent major releases of TypeScript. Fixes #797. Fixes DE-686. Fixes OASIS-25471.
1 parent a1b9485 commit 180c1b0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ This driver uses semantic versioning:
1414
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
1515
changes that require changes in your code to upgrade.
1616

17+
## [Unreleased]
18+
19+
### Fixed
20+
21+
- Fixed default return type of AQL queries being `undefined` instead of `any` ([#797](https://github.com/arangodb/arangojs/issues/797))
22+
1723
## [8.4.0] - 2023-07-10
1824

1925
### Changed
@@ -1705,6 +1711,7 @@ For a detailed list of changes between pre-release versions of v7 see the
17051711

17061712
Graph methods now only return the relevant part of the response body.
17071713

1714+
[unreleased]: https://github.com/arangodb/arangojs/compare/v8.4.0...HEAD
17081715
[8.4.0]: https://github.com/arangodb/arangojs/compare/v8.3.1...v8.4.0
17091716
[8.3.1]: https://github.com/arangodb/arangojs/compare/v8.3.0...v8.3.1
17101717
[8.3.0]: https://github.com/arangodb/arangojs/compare/v8.2.1...v8.3.0

src/aql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ declare const type: unique symbol;
2222
* parameters.
2323
*/
2424
export interface AqlQuery<T = any> {
25-
[type]?: T;
25+
[type]?: T | any;
2626
/**
2727
* An AQL query string.
2828
*/

0 commit comments

Comments
 (0)