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

duplicatekeysyncerror.md

176 lines3.3 KB

1---
2id: DuplicateKeySyncError
3title: DuplicateKeySyncError
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8# Class: DuplicateKeySyncError
9​
10Defined in: [packages/db/src/errors.ts:136](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L136)
11​
12## Extends
13​
14- [`CollectionOperationError`](../collectionoperationerror.md)
15​
16## Constructors
17​
18### new DuplicateKeySyncError()
19​
20```ts
21new DuplicateKeySyncError(key, collectionId): DuplicateKeySyncError
22```
23​
24Defined in: [packages/db/src/errors.ts:137](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L137)
25​
26#### Parameters
27​
28##### key
29​
30`string` | `number`
31​
32##### collectionId
33​
34`string`
35​
36#### Returns
37​
38[`DuplicateKeySyncError`](../duplicatekeysyncerror.md)
39​
40#### Overrides
41​
42[`CollectionOperationError`](../collectionoperationerror.md).[`constructor`](../CollectionOperationError.md#constructors)
43​
44## Properties
45​
46### cause?
47​
48```ts
49optional cause: unknown;
50```
51​
52Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2022.error.d.ts:26
53​
54#### Inherited from
55​
56[`CollectionOperationError`](../collectionoperationerror.md).[`cause`](../CollectionOperationError.md#cause)
57​
58***
59​
60### message
61​
62```ts
63message: string;
64```
65​
66Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1077
67​
68#### Inherited from
69​
70[`CollectionOperationError`](../collectionoperationerror.md).[`message`](../CollectionOperationError.md#message-1)
71​
72***
73​
74### name
75​
76```ts
77name: string;
78```
79​
80Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1076
81​
82#### Inherited from
83​
84[`CollectionOperationError`](../collectionoperationerror.md).[`name`](../CollectionOperationError.md#name)
85​
86***
87​
88### stack?
89​
90```ts
91optional stack: string;
92```
93​
94Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1078
95​
96#### Inherited from
97​
98[`CollectionOperationError`](../collectionoperationerror.md).[`stack`](../CollectionOperationError.md#stack)
99​
100***
101​
102### prepareStackTrace()?
103​
104```ts
105static optional prepareStackTrace: (err, stackTraces) => any;
106```
107​
108Defined in: node\_modules/.pnpm/@types+node@22.13.10/node\_modules/@types/node/globals.d.ts:143
109​
110Optional override for formatting stack traces
111​
112#### Parameters
113​
114##### err
115​
116`Error`
117​
118##### stackTraces
119​
120`CallSite`[]
121​
122#### Returns
123​
124`any`
125​
126#### See
127​
128https://v8.dev/docs/stack-trace-api#customizing-stack-traces
129​
130#### Inherited from
131​
132[`CollectionOperationError`](../collectionoperationerror.md).[`prepareStackTrace`](../CollectionOperationError.md#preparestacktrace)
133​
134***
135​
136### stackTraceLimit
137​
138```ts
139static stackTraceLimit: number;
140```
141​
142Defined in: node\_modules/.pnpm/@types+node@22.13.10/node\_modules/@types/node/globals.d.ts:145
143​
144#### Inherited from
145​
146[`CollectionOperationError`](../collectionoperationerror.md).[`stackTraceLimit`](../CollectionOperationError.md#stacktracelimit)
147​
148## Methods
149​
150### captureStackTrace()
151​
152```ts
153static captureStackTrace(targetObject, constructorOpt?): void
154```
155​
156Defined in: node\_modules/.pnpm/@types+node@22.13.10/node\_modules/@types/node/globals.d.ts:136
157​
158Create .stack property on a target object
159​
160#### Parameters
161​
162##### targetObject
163​
164`object`
165​
166##### constructorOpt?
167​
168`Function`
169​
170#### Returns
171​
172`void`
173​
174#### Inherited from
175​
176[`CollectionOperationError`](../collectionoperationerror.md).[`captureStackTrace`](../CollectionOperationError.md#capturestacktrace)