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

rxdbCollectionOptions.md

66 lines1.5 KB

1---
2id: rxdbCollectionOptions
3title: rxdbCollectionOptions
4---
5​
6# Function: rxdbCollectionOptions()
7​
8## Call Signature
9​
10```ts
11function rxdbCollectionOptions<T>(config): CollectionConfig<InferSchemaOutput<T>, string, T, UtilsRecord> & object;
12```
13​
14Defined in: [rxdb.ts:89](https://github.com/TanStack/db/blob/main/packages/rxdb-db-collection/src/rxdb.ts#L89)
15​
16Creates RxDB collection options for use with a standard Collection
17​
18### Type Parameters
19​
20#### T
21​
22`T` *extends* `StandardSchemaV1`\<`unknown`, `unknown`\>
23​
24### Parameters
25​
26#### config
27​
28[`RxDBCollectionConfig`](../type-aliases/RxDBCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `T`\>
29​
30Configuration options for the RxDB collection
31​
32### Returns
33​
34`CollectionConfig`\<`InferSchemaOutput`\<`T`\>, `string`, `T`, `UtilsRecord`\> & `object`
35​
36Collection options with utilities
37​
38## Call Signature
39​
40```ts
41function rxdbCollectionOptions<T>(config): CollectionConfig<T, string, never, UtilsRecord> & object;
42```
43​
44Defined in: [rxdb.ts:96](https://github.com/TanStack/db/blob/main/packages/rxdb-db-collection/src/rxdb.ts#L96)
45​
46Creates RxDB collection options for use with a standard Collection
47​
48### Type Parameters
49​
50#### T
51​
52`T` *extends* `object`
53​
54### Parameters
55​
56#### config
57​
58`Omit`\<`BaseCollectionConfig`\<`T`, `string`, `never`, `UtilsRecord`, `any`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"` \| `"getKey"`\> & `object` & `object`
59​
60Configuration options for the RxDB collection
61​
62### Returns
63​
64`CollectionConfig`\<`T`, `string`, `never`, `UtilsRecord`\> & `object`
65​
66Collection options with utilities