Commit 58d67f8
refactor: Enable
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, `noImplicitOverride` was explicitly set to `false` across
the app. This was not a design choice, but a workaround: the
auto-generated protobuf types were incompatible with
`noImplicitOverride`, 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.json` files in several
packages (such as `autocertifier-client`, `dht`, `proto-rpc`, and `sdk`)
to isolate generated code and manage its compilation independently.
These are now referenced in the main and test TypeScript configs.
[[1]](diffhunk://#diff-9950b7b77c8a7db18e0ef901b107025b666a0e0a27a436616b43c2fedb34d6c1R1-R10)
[[2]](diffhunk://#diff-de621a41125dd18f6388b50a2ec6281e3b8fa498b793969c76dc0a8d8531f68aR1-R11)
[[3]](diffhunk://#diff-eab3f7cef1e6788318415e3df2a580ecfc85bf2902a773843b518ba10da07d45R1-R10)
* Updated `tsconfig.json` and `tsconfig.jest.json` files to remove
`noImplicitOverride: false` (now set only in generated configs), exclude
generated directories from main source includes, and add references to
the new generated configs.
[[1]](diffhunk://#diff-ae13578e8d026eec67d6b00c439076ab2fc27081e16cb0744b996b414ec28a98L4-R11)
[[2]](diffhunk://#diff-70012901c7a9586d8be81a0f0a58cf6545215824aa31d03c4933123d0df69280L4-R16)
[[3]](diffhunk://#diff-57fd489a6641c04408b02f51816e203938c2d4d819f96f2aee228814678e7d9fL3-R10)
[[4]](diffhunk://#diff-1f70c1f766410506b8ac4d72e9e2cdf43c0dd3a95837202876180763d02093e2L3-R11)
[[5]](diffhunk://#diff-62ec9179a1fd352f07b1db2aae889fa66e81cf7f72ceffe25ae527ff7ad6c492L8-R23)
[[6]](diffhunk://#diff-24db07be3ce94f0c29f9b1cdb5eb169b812640e615757b63168ec8eb28d605c6L6-R6)
[[7]](diffhunk://#diff-24db07be3ce94f0c29f9b1cdb5eb169b812640e615757b63168ec8eb28d605c6R18-R22)
[[8]](diffhunk://#diff-ae13578e8d026eec67d6b00c439076ab2fc27081e16cb0744b996b414ec28a98L4-R11)
**Project reference and dependency cleanup:**
* Reordered and clarified project references in several `tsconfig.json`
files to ensure correct dependency resolution and build order.
[[1]](diffhunk://#diff-6911c66f995472db595934d34bed8bb3b9d4f5f4e8dcef1329a16d498928e684R11-R14)
[[2]](diffhunk://#diff-38daa775ecafcf440e7c2b9817052481019197dfba8e0bbb482e7ce5efe0cfafR13-R16)
[[3]](diffhunk://#diff-62ec9179a1fd352f07b1db2aae889fa66e81cf7f72ceffe25ae527ff7ad6c492L8-R23)
[[4]](diffhunk://#diff-70012901c7a9586d8be81a0f0a58cf6545215824aa31d03c4933123d0df69280L4-R16)
[[5]](diffhunk://#diff-ae13578e8d026eec67d6b00c439076ab2fc27081e16cb0744b996b414ec28a98L4-R11)
**Package script updates:**
* Changed the `check` script in several `package.json` files to use `tsc
-b` (build mode) instead of `tsc -p`, aligning with project references
and improving type checking.
[[1]](diffhunk://#diff-48deceddbbe98a41ff1d0f560db132548031fbd96d790c09ffeed924a20e8a05L29-R29)
[[2]](diffhunk://#diff-e81a3463e3e75e879c7fa17b1609d29d02bb633aaceb777564c9f88a48729ff9L24-R24)
[[3]](diffhunk://#diff-77164cc5c071d1488e1cf72c0f91fdd99dd8976edb5004c83198bbd517039572L39-R39)
[[4]](diffhunk://#diff-e73f8b6abf767f5f6271d1dcbf5188b40d63732e6a8cd772b44f677c2fc36bc1L23-R23)
**Minor code improvements:**
* Added `override` keyword to overridden methods in test and
implementation files for better type safety and clarity.
[[1]](diffhunk://#diff-5e6ebf26c1a7f17946b4a79009d4c286b6a553a215db065393b9f0e32f81dab0L20-R20)
[[2]](diffhunk://#diff-f03278bf6d70079d4859c692194a7896c0ef0270919070d88bd9a739979cf4c5L65-R65)
[[3]](diffhunk://#diff-f03278bf6d70079d4859c692194a7896c0ef0270919070d88bd9a739979cf4c5L93-R93)
[[4]](diffhunk://#diff-0c8af68961e03aa39330bdcca6e9201cc7421497e5dfe3fb4eddfd62b358e22aL29-R29)
---------
Co-authored-by: Copilot <[email protected]>noImplicitOverride on the remaining non-generated code (#3304)1 parent 36fca2b commit 58d67f8
File tree
23 files changed
+102
-51
lines changed- packages
- autocertifier-client
- autocertifier-server
- cli-tools
- dht
- test
- unit
- utils
- proto-rpc
- sdk
- src/identity
- trackerless-network
23 files changed
+102
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
9 | | - | |
| 7 | + | |
10 | 8 | | |
11 | 9 | | |
12 | | - | |
| 10 | + | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | | - | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 3 | | |
7 | 4 | | |
8 | | - | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
| 11 | + | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
0 commit comments