microsoft / microsoft/vscode-python-environments

SimpleDebounce should be a disposable

オープン
#954 コメント 2 件 リアクション 1 件 担当者 3 名 GitHub で見る

まだ誰も着手していません。

debt needs PR
主要言語
TypeScript
スター
138
フォーク
62
平均マージ
1日 4時間
マージ済み PR(30日)
35

説明

This should be disposable:

https://github.com/microsoft/vscode-python-environments/blob/baad0daaa2e01f31ba507176e889bdfaf30d4cff/src/common/utils/debounce.ts#L1-L23

`dispose`'s impl should be:

```ts
public dispose() {
if (this.timeout) {
clearTimeout(this.timeout);
}
}
```

Not having this means that if the debouncer's job is done while the `setTimeout` is active, it will still fire again.

An example of this in practice is if the extension is disabled it should immediately dispose everything. Another example is the transient usage in https://github.com/microsoft/vscode-python-environments/pull/952

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

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

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

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