You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the protons library to generate TypeScript files from .proto files, the generated code contains unused variables, specifically the opts parameter in certain functions. This causes compilation errors when running TypeScript with strict checks enabled.
Steps to reproduce:
Create a project with .proto files.
Use the protons library to generate TypeScript files from the .proto files.
Run TypeScript compilation with strict checks enabled (e.g., tsc --strict).
The generated TypeScript files should not cause any compilation errors related to unused variables.
Actual behavior:
The generated TypeScript files contain unused opts parameters in certain functions, leading to compilation errors when strict checks are enabled.
Example error:
src/generated/example.ts:40:29 - error TS6133: 'opts' is declared but its value is never read.
40 }, (reader, length, opts = {}) => {
~~~~
Workarounds:
Manually modify the generated TypeScript files to remove the unused variables (not ideal).
Use TypeScript compiler options like "skipLibCheck": true or "noUnusedParameters": false to suppress the errors (not recommended for overall project quality).
Proposed Solution
Update the protons library to generate TypeScript code that doesn't include unused variables.
Please let me know if you need any additional information or if there's anything else I can do to assist in resolving this issue. Thank you for your attention and efforts in maintaining the protons library.
When using the
protons
library to generate TypeScript files from.proto
files, the generated code contains unused variables, specifically theopts
parameter in certain functions. This causes compilation errors when running TypeScript withstrict
checks enabled.Steps to reproduce:
Create a project with
.proto
files.Use the protons library to generate TypeScript files from the
.proto
files.Run TypeScript compilation with strict checks enabled (e.g.,
tsc --strict
).You can also check the CI fails on PR chore: upgrade protons + commit new proto code waku-org/js-waku#1898 for a repro
Expected behavior:
The generated TypeScript files should not cause any compilation errors related to unused variables.
Actual behavior:
The generated TypeScript files contain unused opts parameters in certain functions, leading to compilation errors when strict checks are enabled.
Example error:
Workarounds:
"skipLibCheck": true
or"noUnusedParameters": false
to suppress the errors (not recommended for overall project quality).Proposed Solution
Update the
protons
library to generate TypeScript code that doesn't include unused variables.Please let me know if you need any additional information or if there's anything else I can do to assist in resolving this issue. Thank you for your attention and efforts in maintaining the protons library.
cc @achingbrain
The text was updated successfully, but these errors were encountered: