refactor: Enable `noImplicitOverride` on the remaining non-generated code
This pull request refactors TypeScript configuration across multiple packages to improve handling of generated code and project references, and updates some package scripts for consistency. It also includes minor code improvements for clarity and correctness.
[!NOTE] Previously,
noImplicitOverridewas explicitly set tofalseacross the app. This was not a design choice, but a workaround: the auto-generated protobuf types were incompatible withnoImplicitOverride, and there was no proper isolation at the tsconfig level to scope that limitation. As a result, stricter typing guarantees were relaxed globally.Changes in this PR are the remaining step towards bringing the restriction back, making the types stricter again.
Changes
TypeScript configuration improvements:
- Introduced separate
tsconfig.generated.jsonfiles in several packages (such asautocertifier-client,dht,proto-rpc, andsdk) to isolate generated code and manage its compilation independently. These are now referenced in the main and test TypeScript configs. [1] [2] [3] - Updated
tsconfig.jsonandtsconfig.jest.jsonfiles to removenoImplicitOverride: false(now set only in generated configs), exclude generated directories from main source includes, and add references to the new generated configs. [1] [2] [3] [4] [5] [6] [7] [8]
Project reference and dependency cleanup:
- Reordered and clarified project references in several
tsconfig.jsonfiles to ensure correct dependency resolution and build order. [1] [2] [3] [4] [5]
Package script updates:
- Changed the
checkscript in severalpackage.jsonfiles to usetsc -b(build mode) instead oftsc -p, aligning with project references and improving type checking. [1] [2] [3] [4]
Minor code improvements:
- Added
overridekeyword to overridden methods in test and implementation files for better type safety and clarity. [1] [2] [3] [4]