Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/inject-is-mutating-readonly.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
'@tanstack/angular-query-experimental': patch
---

Make `injectIsMutating` signal read-only to prevent external modifications to the internal state
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,7 @@ export interface InjectIsMutatingOptions {
* Can be used for app-wide loading indicators
* @param filters - The filters to apply to the query.
* @param options - Additional configuration
* @returns signal with number of fetching mutations.
* @returns A read-only signal with the number of fetching mutations.
*/
export function injectIsMutating(
filters?: MutationFilters,
Expand DownExpand Up@@ -60,5 +60,5 @@ export function injectIsMutating(

destroyRef.onDestroy(unsubscribe)

return result
return result.asReadonly()
}
7 changes: 7 additions & 0 deletions packages/angular-query-experimental/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,13 @@
"useDefineForClassFields": false,
"target": "ES2022"
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictStandalone": true,
"strictTemplates": true
},
"include": ["src", "scripts", "test-setup.ts", "*.config.*", "package.json"],
"references": [{ "path": "../query-core" }, { "path": "../query-devtools" }]
}
Loading