-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unused parameters in the empty.ts are causing TypeScript check errors #608
Comments
It's not only in empty.ts. It's in any proto message without members. A solution would be to prefix unused variables with _. Use-case: I've got multiple empty types because I expect to add members in the future. |
As timostamm suggested there, generate proto with --ts_opt ts_nocheck. |
thanks ,but where is the --ts_opt that I can add?
if run |
See the documentation here. version: v1
plugins:
- plugin: buf.build/community/timostamm-protobuf-ts:v2.9.1
out: ./ts
opt: ts_nocheck For multiple plugin options, use: version: v1
plugins:
- plugin: ...
out: ...
opt:
- ts_nocheck
- other_option |
Many thanks, now it works!
empty.ts after
and also thanks @danielvandenberg95 I think #609. is a good PR |
This empty.ts was auto generated from protobuf file "google/protobuf/empty.proto" (package "google.protobuf", syntax proto3)
the error is in the function internalBinaryRead
if run script
vue-tsc --noEmit --skipLibCheck
It will cause ts-check error
'reader' is declared but its value is never read.
'length' is declared but its value is never read.
'options' is declared but its value is never read.
The text was updated successfully, but these errors were encountered: