Closed jstcki closed 4 years ago
Good idea, thanks!
I won't be able to work on this before mid-November but I added it to my plans
Great, thanks! I could also make a PR for it (but I assume you won't merge/release that in the meantime as well).
PRs are welcome obviously but correct: I won't merge in the meantime :) (I'll be off for two weeks starting from this afternoon)
OK! Enjoy your vacation! 🌴
I think I got this wrong: from looking at the actual query results, a (more) correct type would be
Promise<
Array<
Record<
string,
{
value: Literal | NamedNode;
label?: Literal;
}
>
>
>;
I checked, this looks correct indeed. Thanks!
d2dba1c / 0.4.1
Currently,
query.execute()
has the return typePromise<any[]>
which should probably be something likePromise<Record<string, NamedNode | Literal>[]>
(or useTerm
instead ofNamedNode | Literal
?)?The
string
key could also be made generic, so one could docube.query<"foo" | "bar">().execute()
=>Promise<Record<"foo" | "bar", NamedNode | Literal>>
, and theSelectsObj
andSelectsArr
arguments could also use that. But maybe that goes too far …