- Notifications
You must be signed in to change notification settings - Fork13k
Add a newbaseline
lib#62540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
3ru wants to merge1 commit intomicrosoft:mainChoose a base branch from3ru:feat/baseline-lib
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Add a newbaseline
lib#62540
+74 −2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
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