Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

isSingleResultCollection.md

22 lines483 Bytes

1---
2id: isSingleResultCollection
3title: isSingleResultCollection
4---
5​
6```ts
7function isSingleResultCollection(collection): boolean;
8```
9​
10Defined in: [packages/db/src/live-query-primitives.ts:41](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-primitives.ts#L41)
11​
12Whether a collection yields a single result (`findOne`) rather than an array.
13​
14## Parameters
15​
16### collection
17​
18[`Collection`](../interfaces/Collection.md)\<`any`, `any`, `any`\>
19​
20## Returns
21​
22`boolean`