microsoft / microsoft/TypeScript

Should `lib` support `disposable`? Should `decorators` be merged with `esnext.decorators`?

Offen
#54,822 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@rbuckton arbeitet bereits daran.

Seit 29.6.2023.

Needs Investigation
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

Currently, you can access all the explicit resource management stuff via the following lib option:

    "lib": ["es2022", "esnext.disposable"],

However, the following doesn't work:

    "lib": ["es2022", "disposable"],

Should it? It is kind of weird that there is no disposable setting whereas you can for decorators.

When I looked into this, I realized an oddity - that there is both a decorators and esnext.decorators, but that they are not the same thing despite both being part of esnext. The only difference is that esnext.decorators defines Symbol.metadata.

These are both part of esnext, so should they be merged?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.