Migrate remaining JS/JSX files to TypeScript and improve type safety#25066
Merged
dennisoelkers merged 20 commits intomasterfrom Feb 24, 2026
Merged
Migrate remaining JS/JSX files to TypeScript and improve type safety#25066dennisoelkers merged 20 commits intomasterfrom
dennisoelkers merged 20 commits intomasterfrom
Conversation
d6f4766 to
fcae958
Compare
…ppress deferred lint issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
linuspahl
approved these changes
Feb 23, 2026
Contributor
linuspahl
left a comment
There was a problem hiding this comment.
These changes look good to me!
| .navbar-collapse, | ||
| .navbar-form { | ||
| border-color: ${chroma(theme.colors.gray[90]).darken(0.065)}; | ||
| border-color: ${chroma(theme.colors.gray[90] as string) |
Contributor
There was a problem hiding this comment.
As far as I can tell we don't need to use as string here and in similar cases.
| help={futureTimestampNormalizationHelpText} | ||
| onChange={(event) => | ||
| handleEnableFutureTimestampNormalisation(getValueFromInput(event.target), setFieldValue) | ||
| handleEnableFutureTimestampNormalisation(Boolean(getValueFromInput(event.target)), setFieldValue) |
Contributor
There was a problem hiding this comment.
I noticed that we sometimes use as to cast the result of getValueFromInput and sometimes we use String() or Boolean(). Is there a reason for it?
Member
Author
There was a problem hiding this comment.
The first was Claude's attempt to do it, I corrected it to use String/Boolean, but it seems like it did not track back all of its changes :/
Member
Author
There was a problem hiding this comment.
Fixed these and other occurences.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
linuspahl
approved these changes
Feb 24, 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.
Description
Motivation and Context
.js/.jsxfiles to TypeScript (.ts/.tsx), bringing the codebase to near-complete TypeScript coverageas anycasts introduced during migration, and reduce remainingascasts to only those structurally necessary(Immutable.js
.toJS(), RefluxcreateActions, plugin binding contravariance, union narrowing)any:Store.get<T>(),Store.sessionGet<T>(),getValueFromInput(),SystemJobsActions.list(), and typedfetch<T>()generics across multiple Reflux storesDetails
Migrated files span actions, stores, logic/utility modules, components, tests, and barrel/index files. A small set of
.jsfiles are intentionally kept: ACE editor mode files,webpack-entry.js,polyfill.js, andlogic/index.js(webpackrequire.context).Type safety improvements:
Store.get/Store.sessionGetare now generic (get<T>(key): T | undefined) instead of returninganygetValueFromInputreturnsstring | number | boolean | undefinedinstead ofanySidecarStatusEnumproperties and methods are fully typedfetch<T>()generics to type API responses (EventDefinitionsStore, SimulatorStore, SystemJobsStore,EnterpriseStore, EventsStore, PluginsStore)
SyntheticEventtoReact.ChangeEvent<HTMLInputElement>where applicable/nocl No user-facing change.
/prd Graylog2/graylog-plugin-enterprise#13306
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: