surrealdb.node
surrealdb.node copied to clipboard
No typescript types and different response shapes between packages
First: 👏 great job - cool product and lib's!
The surrealdb.js package already provides typings for results like this:
query: <T extends RawQueryResult[]>(
query: string,
vars?: Record<string, unknown>,
) => Promise<MapQueryResult<T>>;
Would be awesome if this would also become available in surrealdb.node
.
Also, there is a difference in the response shapes of surrealdb.node
, surrealdb.wasm
and surrealdb.js
The surrealdb.js
package provides a result like this:
[
{
status: string
result?: <result type>
}
]
while surrealdb.node
and surrealdb.wasm
is returning a less deep, structured response like this:
[
<result type>
]
It would be great if this becomes aligned across all the different cool packages.