Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#5336·uppy

Fix TypeScript sins

Author: mifiCreated Jul 15, 2024Updated Sep 30, 2026
LabelsFeature

Pulled out from closed issue #4361

Companion

  • Rewrite Companion to Typescript
  • Companion options object #4355

TypeScript fixes

We have migrated parts of the codebase to typescript. But in the process we have taken some shortcuts, and in order to improve our type safety we should fix this.

  • Fix all $TSFixMe
  • Remove noImplicitAny: false from all tsconfig.json #6508
  • Remove all @ts-ignore unless absolutely necessary
  • Remove all eslint ignore typescript rules unless absolutely necessary #6623
  • maybe use strict typescript config? #6623 (its options are listed explicitly in the presets, minus those Biome covers)
  • set useUnknownInCatchVariables: true #6623
  • noImplicitOverride in all packages #6623
  • tsify private/dev project #6621
  • remove most !: ~159 outside tests, ~63 in tests
  • remove most any: ~262 outside tests, ~124 in tests
  • remove most as (excluding as const): ~278 outside tests, ~125 in tests
  • look into @ts-expect-error which don't have a good reason: ~140 outside tests, ~118 in tests
  • probably fixes: add exactOptionalPropertyTypes (now recommeneded by typescript), see #6040. Enabled in the @uppy-dev/tsconfig presets (#6508), but still opted out in 27 packages
  • noUncheckedIndexedAccess: enabled in the @uppy-dev/tsconfig presets (#6508), but still opted out in 16 packages
  • #6260: ~125 TS private keywords left

https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html

Source: transloadit/uppy

View original on GitHubView discussion on GitHub