Skip to content

chore: turn on typescript noImplicitAny - #3068

Merged
ert78gb merged 14 commits into
masterfrom
no-implicit-any
Oct 27, 2026
Merged

ert78gb merged 14 commits into
masterfrom
no-implicit-any

Conversation

@kareltucek

Copy link
Copy Markdown
Collaborator

Closes #3066 .

Enables strict type-checking that allowed non-type-checked function calls in certain contexts.

  • 60% of the refactor are just enum parses - those are inherently unsafe, and manually asserted wherever clean values are expected. Not much to do about those. We wrap them into fromStringUnsafe so the types remain readable and so that compiler accepts them without errors. (Otherwise, cryptic types would have to be present on the cast site.)
  • 40% are actual fixes potentially dangerous sites.

This does need a review from someone more typescript-literate than I am.

kareltucek and others added 7 commits October 14, 2026 15:08
By-name enum lookups go through the new fromStringUnsafe helper, JSON map callbacks are annotated,
@types/md5 and @types/lodash.isequal added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Type IPC handler args as the tuples the renderer sends, add declarations for the decompress plugins
and @types/semver (required by electron-updater's typings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name-indexed config setters in the reducer cast explicitly, since they are dynamic by design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yargs 18 has no typings and @types/yargs 17 adds ~50 unrelated errors, so it gets an explicit any declaration.
The remaining pre-existing type errors are untouched; the scripts run via ts-node transpileOnly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was dropped in be3e116 (2017), which let calls through implicit `any` (e.g. `obj[stringKey](...)`) go unchecked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kareltucek and others added 7 commits October 22, 2026 12:25
uhk-web bundles uhk-common, which imports md5 from create-md5-hash.ts.
md5 was only reachable transitively through the file:../uhk-common
dependency, and uhk-web's lockfile contained no resolved
node_modules/md5 entry, so a clean install could leave it out and the
dev server failed with:

  Failed to resolve import "md5" from ".angular/vite-root/uhk-web/main.js"

Declare md5 explicitly (pinned to the version uhk-common uses) so the
web build always resolves it.
@ert78gb ert78gb changed the title Turn on noImplicitAny chore: turn on noImplicitAny Oct 27, 2026
@ert78gb ert78gb changed the title chore: turn on noImplicitAny chore: turn on typescript noImplicitAny Oct 27, 2026
@ert78gb
ert78gb merged commit 46c283b into master Oct 27, 2026
6 checks passed
@ert78gb
ert78gb deleted the no-implicit-any branch October 27, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typechecking issues.

3 participants