You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using vue-concurrency with TypeScript and ESLint.
I am aware of the TypeScript limitations and that intermediate values need to be explicily typed or else they will be given a type of any.
But after typing my intermediate values ESLint still complains about the any value: Unsafe assignment of an 'any' value. eslint(@typescript-eslint/no-unsafe-assignment)
Here is my full code, with comment on the error line:
I could disable the ESLint error with // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment but I would rather solve the problem instead of disabling it.
The text was updated successfully, but these errors were encountered:
But you can take a look at useAsyncTask: https://vue-concurrency.netlify.app/api-overview/other/#useasynctask
The cancellation of useAsyncTask is less effective (the code within async function cannot be cancelled will just finish running), but in practice it's super OK to use for small tasks that have no or just one await. It should definitely be avoided if you use some concurrency modifiers like drop() or restartable().
I'm using vue-concurrency with TypeScript and ESLint.
I am aware of the TypeScript limitations and that intermediate values need to be explicily typed or else they will be given a type of
any
.But after typing my intermediate values ESLint still complains about the
any
value:Unsafe assignment of an 'any' value. eslint(@typescript-eslint/no-unsafe-assignment)
Here is my full code, with comment on the error line:
Is this a bug or am I doing something wrong?
I could disable the ESLint error with
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
but I would rather solve the problem instead of disabling it.The text was updated successfully, but these errors were encountered: