-
Notifications
You must be signed in to change notification settings - Fork 12.8k
error TS6133 ... "is declared but its value is never read." #24249
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
Comments
Prefix the unused parameter with an underscore, as in |
Why do we need that? It's kind of strange all my express functions will contains different parameters:
|
@dgofman-equinix You enable a feature that will error on unused parameters, then complain that it errors about unused parameters? If you don't like this feature, then don't enable it. The |
It's |
Prior discussion at #9458 |
I am using D3 and all callback functions should receiving 3 parameters.
"ValueFn<GElement, Datum, void>"
I defined my event listeners as
When I compiling to JS file and running via LINT/JSHINT no errors, however by enabling in tsconfig.json
"noUnusedParameters": true
I am getting errors: "error TS6133: 'd' is declared but its value is never read."
"d" is first argument you cannot avoid it. So, why TS compiler so crazy and cannot recognize it?
The text was updated successfully, but these errors were encountered: