developit / developit/workerize-loader

Typescript types?

オープン
#3 コメント 16 件 リアクション 14 件 担当者 0 名 GitHub で見る
question
主要言語
JavaScript
スター
2.3k
フォーク
85
PR マージ指標
30日以内にマージされた PR はありません

説明

Its a bit difficult to write a definition file... any ideas how to handle that?

Would be easier if the export was the factory function that returns the exported functions:

```js
export default function worker() {
function expensive(time) {
let start = Date.now(), count = 0
while (Date.now() - start < time) count++
return count
}
return {expensive}
}
```

then the types would be identical if the functions return promises.

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

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

評価

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

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

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