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
We don't get any errors, even with noImplicitAny set.
But arg has implicitly type any, because its type annotation refers to the type of the setter itself, and there are no getters.
🙂 Expected behavior
An error on prop2 or arg, at least under noImplicitAny.
The text was updated successfully, but these errors were encountered:
Actually, an error is reported, but the error message is misleading and is reported as a global error because the logic attempts to report on the get accessor, but there isn't one. So, several things are wrong here.
Bug Report
A setter can have an argument with a self-referential annotation, and this argument will implicitly have type
any
, with TS producing no errors for it.🔎 Search Terms
setter, implicit any
🕗 Version & Regression Information
As far back as 4.3 (when we first let setters/getters in type literals).
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
We don't get any errors, even with
noImplicitAny
set.But
arg
has implicitly typeany
, because its type annotation refers to the type of the setter itself, and there are no getters.🙂 Expected behavior
An error on
prop2
orarg
, at least undernoImplicitAny
.The text was updated successfully, but these errors were encountered: