-
Couldn't load subscription status.
- Fork 109
Description
Hey everyone,
I hope you're doing well. I've recently encountered a type-related issue after updating ArangoJS from version 8.0.0 to 8.4.0 in our project. This issue pertains to the changes in type definitions that seem to have caused a regression in some core functionalities.
export async function getUser(name:string) {
const results = await db.query(
aql`FOR u in User FILTER ${name} == u.name RETURN u`
);
return await results.next();
}
The return type of the above database query has been updated to (8.4.0) Promise<ArrayCursor<undefined>>, whereas in version 8.0.0, it was Promise<ArrayCursor<any>>. Although it is possible to specify a type for the AQL string handler, it appears that the default type of any is no longer functioning as expected.
export declare function aql<T = any>(templateStrings: TemplateStringsArray, ...args: AqlValue[]): GeneratedAqlQuery<T>;
Following image shows the VScode intellisense types:
Thanks in advance!