Skip to content

Commit 686ff8a

Browse files
Copilothotlong
andcommitted
Fix TypeScript build errors and verify all tests pass
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 936b692 commit 686ff8a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

packages/data-objectstack/src/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class ObjectStackAdapter<T = any> implements DataSource<T> {
7070
} catch (error: any) {
7171
throw new ConnectionError(
7272
error?.message || 'Failed to connect to ObjectStack server',
73-
this.client.config?.baseUrl,
73+
undefined,
7474
{ originalError: error }
7575
);
7676
}
@@ -181,14 +181,15 @@ export class ObjectStackAdapter<T = any> implements DataSource<T> {
181181
}
182182

183183
await this.client.data.deleteMany(resource, ids);
184-
return [];
184+
return [] as T[];
185185
}
186186

187187
case 'update': {
188188
// Check if client supports updateMany
189-
if (typeof this.client.data.updateMany === 'function') {
189+
if (typeof (this.client.data as any).updateMany === 'function') {
190190
try {
191-
return await this.client.data.updateMany<T>(resource, data);
191+
const updateMany = (this.client.data as any).updateMany;
192+
return await updateMany(resource, data) as T[];
192193
} catch (error) {
193194
// If updateMany is not supported, fall back to individual updates
194195
console.warn('updateMany not supported, falling back to individual updates');

0 commit comments

Comments
 (0)