Issue Task Under Review

#111589Report unsafe assignments of any values in TypeScript

Benjamin Kott 11/25/26, 13:59 updated 11/25/26, 13:59

Description

The TypeScript build runs with strict and therefore strictNullChecks, yet a value typed as any passes every null check.

In Build/Sources/TypeScript/backend/user-pass-login.ts, document.querySelector() receives its selector from an options: any property. The call therefore returns any instead of HTMLInputElement | null, and the missing null handling is not reported by tsc:

protected options: any;
// ...
const usernameField: HTMLInputElement = document.querySelector(this.options.usernameField);

Enable the ESLint rule typescript-eslint/no-unsafe-assignment@, which reports every assignment of an any value to a typed target. The type-aware lint setup is already in place (parserOptions.project in Build/eslint.config.mjs).

The rule currently reports 701 findings, spread over about 190 files, mostly in EXT:backend and EXT:install. They have to be resolved by giving the values real types, not by casting, before the rule can be enabled.

Related: #102560

Reviews 1

History 01

  1. Gerrit Code Review pushed patch set 1 for main to change 98023 status New Under Review 11/25/26, 13:59