(params)
| 1862 | |
| 1863 | // Enhanced internalSync that captures write functions for manual use |
| 1864 | const enhancedInternalSync: SyncConfig<any>[`sync`] = (params) => { |
| 1865 | const { begin, write, commit, collection } = params |
| 1866 | |
| 1867 | // Get the base query key for the context (handle both static and function-based keys) |
| 1868 | const contextQueryKey = |
| 1869 | typeof queryKey === `function` |
| 1870 | ? (queryKey({}) as unknown as Array<unknown>) |
| 1871 | : (queryKey as unknown as Array<unknown>) |
| 1872 | |
| 1873 | // Store references for manual write operations |
| 1874 | writeContext = { |
| 1875 | collection, |
| 1876 | queryClient, |
| 1877 | queryKey: contextQueryKey, |
| 1878 | getKey: getKey as (item: any) => string | number, |
| 1879 | begin, |
| 1880 | write, |
| 1881 | commit, |
| 1882 | updateCacheData, |
| 1883 | } |
| 1884 | |
| 1885 | // Call the original internalSync logic |
| 1886 | return internalSync(params) |
| 1887 | } |
| 1888 | |
| 1889 | // Create write utils using the manual-sync module |
| 1890 | const writeUtils = createWriteUtils<any, string | number, any>( |
nothing calls this directly
no test coverage detected