Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #62536
Overview
lib
value,baseline
, to TypeScript.compilerOptions.lib: ["baseline"]
in tsconfig.json, the compiler only exposes types for JavaScript built‑ins that have reached Baseline Widely Available ("high"). Any built‑ins that are not yet in Baseline (low
/false
) are left undeclared and thus surface as ordinary type errors when referenced.Scope (In/Out)
javascript.builtins.*
in web‑features whosestatus.baseline == "high"
(Widely Available).Spec
baseline
.src/lib/baseline.d.ts
, and reference only those existingsrc/lib/es20xx.*.d.ts
fragments that correspond to Baseline Widely features via/// <reference lib="...">
.Data Source and Verification (jq)
web-features
data.json
/Users/ru/Documents/eslint-plugin/eslint-plugin-baseline-js/node_modules/web-features/data.json
status.baseline == "high"
and anycompat_features
entry starts withjavascript.builtins.
. We verified both the count and the list.Set a variable:
DATA_PATH="/Users/ru/Documents/eslint-plugin/eslint-plugin-baseline-js/node_modules/web-features/data.json"
Count (unique feature IDs):
List (unique feature IDs):
TODO
Scope and variants
baseline.full
variant similar toes2015.full
that also includes host libs likedom
? (Note: this would mean JS is Baseline‑gated, but DOM is not.)Defining
baseline.d.ts
src/lib/es2023.array.d.ts
currently contains both:findLast
/findLastIndex
(web‑features:array-findlast
, Baseline = high), andtoReversed
/toSorted
/toSpliced
/with
(web‑features:array-by-copy
, Baseline = low)es2023.array.findlast
vses2023.array.by-copy
) sobaseline
can safely include only the Baseline‑high set.Sustainable data maintenance