-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Core Typechecking: enable noImplicitAny #37201
Conversation
8809462
to
0786c79
Compare
@@ -128,8 +128,7 @@ export function isAmpMessage(message) { | |||
); | |||
} | |||
|
|||
/** @typedef {{creativeId: string, message: string}} */ | |||
export let IframeTransportEventDef; | |||
/** @typedef {{creativeId: string, message: string}} IframeTransportEventDef */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Def
as a suffix existed so we could lint-allow unused variables. For TS typing we can/should drop it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚲 time! I agree overall, but I view that as incredibly low priority. Low enough that I'd rather not make the change in this PR, and likely won't in followup PRs either. AFAIK there is no downside to keeping the Def in there.
0508e56
to
1e5176e
Compare
Hey @jridgewell! These files were changed:
|
3f09fa2
to
aa5da62
Compare
Co-authored-by: Ryan Cebulko <[email protected]>
2a30653
to
479b2f3
Compare
summary
Enables the
noImplicitAny
option for core tsconfig. There were a few changes necessary, and I am happy to bikeshed any of them:any
. This required I then remove all the explicitimport
statement of those types, since they are not JS values.@const
and@private
shorthand cannot be used for declaring types, and I switched them to using@type
.Object
orCSSStyleDeclarations
via a string needed casting to any. Some I was able to fix via restructure, others seemed like too deep a well to solve (i.e.deepMerge
). The logic for leaving as-is in this PR as that this doesn't make things perfect, but better than they were before (explicit any > implicit any).