Microsoft/TypeScript

AbortController.abort is missing in lib.webworker.d.ts

Open

#49.609 geöffnet am 20. Juni 2022

Auf GitHub ansehen
 (5 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)TypeScript (6.726 Forks)batch import
BugDomain: lib.d.tsHelp Wanted

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

Bug Report

AbortController.abort remains commented out and is not available in lib.webworker.d.ts.

🔎 Search Terms

AbortController, abort

🕗 Version & Regression Information

It's from v4.7.2. It was OK in v4.6.4. And also, lib.dom.d.ts is fine.

💻 Code

    const controller = new AbortController();
    const cancel = (): void => controller.abort();

🙁 Actual behavior

src/core.ts:99:42 - error TS2339: Property 'abort' does not exist on type 'AbortController'.

99     const cancel = (): void => controller.abort();
                                             ~~~~~

🙂 Expected behavior

The correct behavior is that even in a worker can compile correctly.

Contributor Guide