Open History to see the last commit
1---
2id: electricCollectionOptions
3title: electricCollectionOptions
4---
5
6## Call Signature
7
8```ts
9function electricCollectionOptions<T>(config): Omit<CollectionConfig<InferSchemaOutput<T>, string | number, T, UtilsRecord>, "utils" | "onInsert" | "onUpdate" | "onDelete"> & Pick<ElectricCollectionConfig<InferSchemaOutput<T>, T>, "onInsert" | "onUpdate" | "onDelete"> & object;
10```
11
12Defined in: [packages/electric-db-collection/src/electric.ts:1081](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L1081)
13
14Creates Electric collection options for use with a standard Collection
15
16### Type Parameters
17
18#### T
19
20`T` *extends* `StandardSchemaV1`\<`unknown`, `unknown`\>
21
22The explicit type of items in the collection (highest priority)
23
24### Parameters
25
26#### config
27
28[`ElectricCollectionConfig`](../interfaces/ElectricCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `T`\> & `object`
29
30Configuration options for the Electric collection
31
32### Returns
33
34`Omit`\<`CollectionConfig`\<`InferSchemaOutput`\<`T`\>, `string` \| `number`, `T`, `UtilsRecord`\>, `"utils"` \| `"onInsert"` \| `"onUpdate"` \| `"onDelete"`\> & `Pick`\<[`ElectricCollectionConfig`](../interfaces/ElectricCollectionConfig.md)\<`InferSchemaOutput`\<`T`\>, `T`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"`\> & `object`
35
36Collection options with utilities
37
38## Call Signature
39
40```ts
41function electricCollectionOptions<T>(config): Omit<CollectionConfig<T, string | number, never, UtilsRecord>, "utils" | "onInsert" | "onUpdate" | "onDelete"> & Pick<ElectricCollectionConfig<T, never>, "onInsert" | "onUpdate" | "onDelete"> & object;
42```
43
44Defined in: [packages/electric-db-collection/src/electric.ts:1099](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L1099)
45
46Creates Electric collection options for use with a standard Collection
47
48### Type Parameters
49
50#### T
51
52`T` *extends* `Row`\<`unknown`\>
53
54The explicit type of items in the collection (highest priority)
55
56### Parameters
57
58#### config
59
60[`ElectricCollectionConfig`](../interfaces/ElectricCollectionConfig.md)\<`T`, `never`\> & `object`
61
62Configuration options for the Electric collection
63
64### Returns
65
66`Omit`\<`CollectionConfig`\<`T`, `string` \| `number`, `never`, `UtilsRecord`\>, `"utils"` \| `"onInsert"` \| `"onUpdate"` \| `"onDelete"`\> & `Pick`\<[`ElectricCollectionConfig`](../interfaces/ElectricCollectionConfig.md)\<`T`, `never`\>, `"onInsert"` \| `"onUpdate"` \| `"onDelete"`\> & `object`
67
68Collection options with utilities