microsoft / microsoft/TypeScript
Support lib: "baseline-widely-available"
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
### 🔍 Search Terms
"Baseline Widely Available"
### ✅ Viability Checklist
- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [x] This wouldn't change the runtime behavior of existing JavaScript code
- [x] This could be implemented without emitting different JS based on the types of the expressions
- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
### ⭐ Suggestion
When creating websites, it is now an industry standard to support [Baseline Widely Available](https://web.dev/baseline) JS APIs. Rather than only being able to select an ECMAScript year in the `lib` config, how about adding `"baseline-widely-available"` where it updates with each TS release, only allowing JS API and syntax that is marked as Widely Available?
### 📃 Motivating Example
To ensure that you only use API and syntax supported by all major browsers, you will be able to set:
```json
{
"compilerOptions": {
"lib": ["baseline-widely-available"]
}
}
```
This means that you can be assured that all the JS you write has been supported for at least 30 months.
### 💻 Use Cases
1. Writing modern websites and always knowing which APIs are available for use.
2. You could use ESLint rules to ban too modern JS API but that is an opt-out structure, where this would prevent mistakes at the lowest level, when writing the code.
3. Currently using `lib: "ES2022"` as this covers the time gap but it's not self-updating and could still include items that some browsers are yet to support in the 30 month version history.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Start with the compilerOptions.lib setting described in the issue and compare the requested Baseline Widely Available behavior with existing ECMAScript-year selection. Review the linked Baseline documentation to determine how qualifying APIs and syntax should be represented and updated per TypeScript release. Done means a defined, maintainable lib target that enforces the stated browser-support guarantee.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100