microsoft / microsoft/TypeScript
Should `lib` support `disposable`? Should `decorators` be merged with `esnext.decorators`?
Open
@rbuckton is already working on this.
Since Jun 29, 2023.
Needs Investigation
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.4k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.