withCache is causing Lint Type error when used.
Lint Error:
The inferred type of 'sampleReatomResource' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@reatom/async/build/withCache'. This is likely not portable. A type annotation is necessary.ts(2742)
code:
export const sampleReatomResource = reatomResource(async (ctx) => {
return await ctx.schedule(() => {
const number = 10;
return Promise.resolve(number);
});
}, 'sampleReatomResource ').pipe(
withDataAtom(null),
withErrorAtom(),
withCache({ withPersist: withLocalStorage }), // <========== If we comment this line the error goes away
withConcurrency('first-in-win'),
withStatusesAtom(),
);
Package @reatom/framework
3.4.52
Chrome
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too