Confusion about TS strict-mode support. noImplicityAny: true
fails build
#7665
Closed
VapidLinus
started this conversation in
General
Replies: 1 comment 4 replies
-
Why are you type checking React Aria's source code (src directory)? Shouldn't typescript be picking up the compiled d.ts files? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the past I could not build my project with full TS strict-mode, especially
noImplicityAny: true
as this caued my build to fail:So in my tsconfig I've always had this in my config:
Now with the November Release claiming "React Spectrum and React Aria are now Typescript Strict compliant!" , I went ahead and updated all my react-aria dependencies, enabled
noImplicitAny
again and compiled!To then again just be greeted with the same error as in the start of this post. I checked the source code here on GitHub and indeed, that section of the code has not changed and does use an implicit any:
react-spectrum/packages/@react-aria/button/src/useButton.ts
Line 111 in 3e1c518
Disabling
noImplicitAny
again and now my build compiles. I really though this release would let me enable no impliciy any again, but it appears not.Both my build system and IDE reports this as an error when I turn on no implicit any:

./node_modules/@react-aria/button/src/useButton.ts:112:17
Back in May I made a discussion about this same thing, where @snowystinger suggested this could be fixed by either #3183 or #1890, and now both of those issues are closed.
Am I missunderstanding something here? Can someone point me in the right direction? Any guideance would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions