lib: add Math.sumPrecise type definition (ES2026 / esnext)#63554
Open
VanshBD wants to merge 2 commits into
Open
lib: add Math.sumPrecise type definition (ES2026 / esnext)#63554VanshBD wants to merge 2 commits into
VanshBD wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new esnext.math lib to expose Math.sumPrecise in the TypeScript standard library surface area.
Changes:
- Register new
esnext.mathlib in the lib registry (libs.json) and CLI lib name mapping (commandLineParser.ts) - Add
esnext.mathto theesnextumbrella lib references (esnext.d.ts) - Introduce
src/lib/esnext.math.d.tsdefiningMath.sumPrecise(numbers: Iterable<number>)
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/lib/libs.json | Adds esnext.math to the known lib list |
| src/lib/esnext.math.d.ts | Declares the new Math.sumPrecise API |
| src/lib/esnext.d.ts | References esnext.math from the esnext umbrella lib |
| src/compiler/commandLineParser.ts | Enables --lib esnext.math name-to-file resolution |
Author
|
@microsoft-github-policy-service agree |
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
Sign up for free
to 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 #63427
Summary
Adds type definition for
Math.sumPrecise, which reached TC39 Stage 4on 2025-07-28 and is part of ES2026.
Changes
src/lib/esnext.math.d.ts— new file withMath.sumPrecisedefinitionsrc/lib/esnext.d.ts— addedesnext.mathreferencesrc/lib/libs.json— registeredesnext.mathlib targetsrc/compiler/commandLineParser.ts— addedlib.esnext.math.d.tstargetPlacement rationale
Math.sumPrecise reached Stage 4 on 2025-07-28, after the ES2025 cutoff.
Correctly placed under
esnextfollowing the same pattern as otheresnext domain libs (esnext.array, esnext.date, etc.)
References