MartinMalinda / vue-concurrency

A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.

Home Page:https://vue-concurrency.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export types like TaskInstance

djmattyg007 opened this issue · comments

This will provide more flexibility when typing things.

They're exported but maybe not in root, I'll take a look.

So far this should work I think: (change vue3 to vue2 if needed):

import { Task } from "vue-concurrency/dist/vue3/src/Task";
import { TaskInstance } from "vue-concurrency/dist/vue3/src/TaskInstance";

I'll try to make this work:

import { Task, TaskInstance } from "vue-concurrency";

Importing from nested paths feels very clunky. It would definitely be easier if the relevant types were exported through the main entrypoint (something which typescript absolutely fully supports).

This should be fixed as part of 2.1.1

Screenshot 2021-07-18 at 12 18 51