etherpad-lite/src/types
SamTV12345 21080e13a2 fix(types): drive ts-check error count to zero
Final cleanup pass after the structural changes in earlier commits.
Most fixes are localized: type-only assertions on heterogeneous data,
optional/null parameters, missing or moved type imports, and ambient
declarations for untyped third-party modules.

Highlights:
- types/globals.d.ts: ambient declarations for find-root,
  languages4translatewiki, lodash.clonedeep, measured-core,
  openapi-schema-validation, proxy-addr, wtfnode (all `any`).
- PadType: add getKeyRevisionNumber and make addSavedRevision label
  optional to match Pad implementation.
- Pad: relax visibility on db/atext/pool/head/chatHead/id from
  private to public (callers in test files and security checks
  already access them; the encapsulation was decorative).
- hooks/i18n: export availableLangs as a typed `let` so test files
  can read it via the namespace import.
- hooks (pluginfw): type the deprecationWarned cache.
- LibreOffice: non-null assertions on p.child after spawn.
- pad_utils: drop missing CookiesStatic re-export, derive from jsCookie.
- LinkInstaller: switch `import {dependencies, name} from package.json`
  to default import with `with { type: 'json' }` (NodeNext requires this).
- vendors/html10n: drop import of mocha's Func; declare locally.
- Tests:
  - i18n: switch to `import * as i18n` since module has no default.
  - skiplist: relative import (the package self-import wasn't resolvable).
  - admin_utils: ts-ignore for cross-package admin/ import.
  - SessionStore: declare ss as `any` to bypass Session/Store mismatch.
  - Stream: non-null assertions on optional iterator throw/return; throw
    method declared returning IteratorResult.
  - importexport / sessionsAndGroups: annotate done/res params.
  - chat: relies on Pad.id being public now.
  - webaccess: drop unused mocha Func import.
- adminsettings: padMapping element typed as string|number for sortBy=lastEdited.
- handler/APIHandler: pass null for `this` in apply() to drop implicit-any.
- handler/PadMessageHandler: addSavedRevision call now matches optional label.
- Cleanup: padUsersCount returns object, access .padUsersCount field.
- ExportHtml: cast list properties to number/string at index sites; cast
  authorColors lookup. Non-null assertions on nextLine inside guarded block.
- toolbar: cast availableButtons through Record<string, any> for dynamic keys.
- padDiff: Number(this._fromRev/_toRev) for arithmetic.
- API.ts: oldText.match guard, getRevisionChangeset/getText/getHTML accept
  string|number rev.
- security/SecretRotator: Kdf.derive base method declared as Promise<any>
  so subclass returning a string is assignable.
2026-04-26 17:53:00 +02:00
..
globals.d.ts fix(types): drive ts-check error count to zero 2026-04-26 17:53:00 +02:00