-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usePipeTask raises "c.perform is not a function" when trying to integrate with the Quasar framework #43
Comments
Thanks for reporting this. I just tried this in a If I copy paste the definition for pipeTask directly in my code, it works: import { useTask } from "vue-concurrency";
import { Task } from "vue-concurrency/dist/vue3/src/Task";
export function usePipeTask<T, U extends any[]>(
firstTask: Task<any, U>,
...restTasks: Task<any, any>[]
): Task<T, U> {
return useTask(function* (signal, ...args: U) {
let result = yield firstTask.perform(...args).canceledOn(signal);
for (let task of restTasks) {
result = yield task.perform(result).canceledOn(signal);
}
return result;
});
} I'll try to check what's wrong in the build ouput soon |
Thanks for the quick response and for confirming. It does work when I copy the code directly into my project, so at least there's a workaround. By the way, looks like my example is a little bit broken (async setup not done correctly) but it can still be tested with |
@realflight1 AFAIK Instead of using |
Might be related to #51 |
This is likely fixed in 5.0. Can anyone confirm? |
I am trying to integrate vue-concurrency with Quasar v2, a Vue 3 framework. When using
usePipeTask
I get the following error:To reproduce, I created a minimal Quasar project from scratch, installed vue-concurrency, added
regenerateRuntime
to the webpack configuration (otherwise I get an error) and finally copied the test code forusePipeTask
. The changes can be viewed in this commit.To run the minimal project:
Am I missing something in my configuration (most likely) or is this a bug? Thanks!
The text was updated successfully, but these errors were encountered: