Skip to content

Commit

Permalink
Fix incorrectly documented QueryResponse type in typescript.mdx
Browse files Browse the repository at this point in the history
As per the index.d.ts file and in general how query responses are shaped the `QueryResponse` type is correctly typed as:
```
export type QueryResponse<E extends Entity<any, any, any, any>> = {
  data: EntityItem<E>[];
  cursor: string | null;
};
```
though in the docs reference it was typed as:
```
export type QueryResponse<E extends Entity<any, any, any, any>> = {
  data: EntityItem<E>;
  cursor: string | null;
};
```
this kinda confused me and hence this docs correction.
  • Loading branch information
ashishpandey001 committed May 8, 2024
1 parent dbc9f49 commit fa3e9e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/src/pages/en/reference/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The `QueryResponse` type is the same type returned by an ElectroDB Query.

```typescript
export type QueryResponse<E extends Entity<any, any, any, any>> = {
data: EntityItem<E>;
data: EntityItem<E>[];
cursor: string | null;
};
```
Expand Down

0 comments on commit fa3e9e5

Please sign in to comment.