andywer / andywer/threads.js

Export WorkerPool related types to make pool typing easier

オープン
#372 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
3.5k
フォーク
173
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello. First of all, thank you for this great library.

Would it be possible to export `ExposedToThreadType`, `QueuedTask` and `WorkerPool` types to use in our apps? With these types available it would be much easier to type Pool and/or array of tasks inside our apps like:

```ts
import { Pool, spawn, ExposedToThreadType, QueuedTask, WorkerPoolType } from 'threads';

...

class App {
queue: QueuedTask, boolean>[];
pool: WorkerPool>;
...
```

or is there any other way to type these variables? Thank you!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。