Skip to content

Commit 8878c5d

Browse files
Fix CI: re-export ParamsType from sdk, add @angular/core deps, fix lint
- Re-export ParamsType from sdk/index.ts (lost during merge) - Add @angular/core as peer + dev dependency for type resolution - Remove unused UseTableRowType in inject-table.ts - Add explicit type for onCleanup parameter in Angular effects
1 parent 096155c commit 8878c5d

5 files changed

Lines changed: 17 additions & 6 deletions

File tree

crates/bindings-typescript/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@
189189
"react": "^18.0.0 || ^19.0.0-0 || ^19.0.0",
190190
"svelte": "^4.0.0 || ^5.0.0",
191191
"undici": "^6.19.2",
192-
"vue": "^3.3.0"
192+
"vue": "^3.3.0",
193+
"@angular/core": ">=17.0.0"
193194
},
194195
"peerDependenciesMeta": {
195196
"@tanstack/react-query": {
@@ -206,6 +207,9 @@
206207
},
207208
"vue": {
208209
"optional": true
210+
},
211+
"@angular/core": {
212+
"optional": true
209213
}
210214
},
211215
"devDependencies": {
@@ -230,6 +234,8 @@
230234
"typescript": "^5.9.3",
231235
"typescript-eslint": "^8.18.2",
232236
"vite": "^7.1.5",
233-
"vitest": "^3.2.4"
237+
"vitest": "^3.2.4",
238+
"@angular/core": "^21.1.0",
239+
"@angular/compiler": "^21.1.0"
234240
}
235241
}

crates/bindings-typescript/src/angular/injectors/inject-reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function injectReducer<ReducerDef extends UntypedReducerDef>(
1313
const reducerName = reducerDef.accessorName;
1414

1515
// flush queued calls when connection becomes active
16-
effect(onCleanup => {
16+
effect((onCleanup: (fn: () => void) => void) => {
1717
const state = connState();
1818
if (!state.isActive) {
1919
return;

crates/bindings-typescript/src/angular/injectors/inject-table.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ export function injectTable<TableDef extends UntypedTableDef>(
9292
): Signal<TableRows<TableDef>> {
9393
assertInInjectionContext(injectTable);
9494

95-
type UseTableRowType = RowType<TableDef>;
96-
9795
const connState = inject(SPACETIMEDB_CONNECTION);
9896

9997
const accessorName = getQueryAccessorName(query);
@@ -140,7 +138,7 @@ export function injectTable<TableDef extends UntypedTableDef>(
140138
});
141139
};
142140

143-
effect(onCleanup => {
141+
effect((onCleanup: (fn: () => void) => void) => {
144142
const state = connState();
145143
if (!state.isActive) {
146144
return;

crates/bindings-typescript/src/sdk/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export { schema, convertToAccessorMap } from './schema.ts';
99
export { table } from '../lib/table.ts';
1010
export { reducerSchema, reducers } from './reducers.ts';
1111
export { procedureSchema, procedures } from './procedures.ts';
12+
export * from './type_utils.ts';

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)