Repository navigation
Viz: add explicit return types where TypeScript infers a concrete type - #36380
Merged
Merged
Conversation
pharret31
previously approved these changes
Nov 18, 2026
Writes out the inferred return type (void, primitives, named and object
types) of 880 functions in js/__internal/viz. Functions whose inferred
type is any, never[], {} or unknown are left for typing by hand.
Removes the explicit-function-return-type disable from the 13 files that
are now clean, and four explicit-module-boundary-types disables that
became unused. Exports the DatesDifferences and SvgDomElement interfaces
for the new annotations. Emitted JS is unchanged.
TypeScript inferred these from an `any` that flows into the result, so the written-out types were narrower than the runtime values: - tick_generator addInterval: Date and number overloads, like dateUtils.addInterval; - parse_utils string/numeric parsers: also null and undefined; - sankey data_validator validate: the 'E2006' error code or null; - range_series getSeriesPairCoord: the found coordinate or null.
pharret31
force-pushed
the
viz-return-type-26_2
branch
from
November 18, 2026 11:41
d191ab0 to
64eeba7
Compare
pharret31
approved these changes
Nov 18, 2026
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.
No description provided.