We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Correct typings for data returned by entity when {data: "raw"} is provided ElectroDB Version 3.0.1
Is it possible to do something like:
type GoGetTerminal< A extends string, F extends string, C extends string, S extends Schema<A, F, C>, ResponseItem, > = <Options extends GoQueryTerminalOptions<keyof ResponseItem>>( options?: Options, ) => Options extends { data: "raw" } ? Promise<{ data: { $metadata: { httpStatusCode: number; requestId: string; extendedRequestId: string | undefined; cfId: string | undefined; attempts: number; totalRetryDelay: number; }; Item?: ResponseItem; }; }> : Options extends GoQueryTerminalOptions<infer Attr> ? Promise<{ data: | { [Name in keyof ResponseItem as Name extends Attr ? Name : never]: ResponseItem[Name]; } | null; }> : Promise<{ data: ResponseItem | null }>;
The text was updated successfully, but these errors were encountered:
Or at the very least it should have "unknown".
type GoGetTerminal< A extends string, F extends string, C extends string, S extends Schema<A, F, C>, ResponseItem, > = <Options extends GoQueryTerminalOptions<keyof ResponseItem>>( options?: Options, ) => Options extends { data: "raw" } ? unknown : Options extends GoQueryTerminalOptions<infer Attr> ? Promise<{ data: | { [Name in keyof ResponseItem as Name extends Attr ? Name : never]: ResponseItem[Name]; } | null; }> : Promise<{ data: ResponseItem | null }>;
Sorry, something went wrong.
It is definitely possible, though it hasn't been prioritized for bandwidth reasons at the current moment.
No branches or pull requests
Describe the bug
Correct typings for data returned by entity when {data: "raw"} is provided
ElectroDB Version
3.0.1
Is it possible to do something like:
The text was updated successfully, but these errors were encountered: