Skip to content

chore: Ts more explicit modules #8375

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

Merged
merged 8 commits into from
Jun 11, 2025
Merged

chore: Ts more explicit modules #8375

merged 8 commits into from
Jun 11, 2025

Conversation

snowystinger
Copy link
Member

@snowystinger snowystinger commented Jun 10, 2025

Closes

Form stories is a 1:1 comparison to convert to CSF. All S2 icons/illustrations now have a return type of ReactNode, this should be correct for newer versions of React and is what we currently return https://app.unpkg.com/@react-spectrum/[email protected]/files/icons/3D.d.ts

All v3 icons now return JSX.Element, same as implicit https://app.unpkg.com/@spectrum-icons/[email protected]/files/123.d.ts

Made some files in dev/test-utils typescript so that i could explicitly type the source as opposed to casting where it was being used

To test, you can edit tsconfig. Note, there are still errors in the repo, this is a subset of the changes

-     "allowJs": true,
+     "allowJs": false,
+    "declaration": true,
+    "isolatedDeclarations": true,

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jun 10, 2025

Build successful! 🎉

@rspbot
Copy link

rspbot commented Jun 11, 2025

Build successful! 🎉

@rspbot
Copy link

rspbot commented Jun 11, 2025

Build successful! 🎉

@rspbot
Copy link

rspbot commented Jun 11, 2025

Build successful! 🎉

@dannify
Copy link
Member

dannify commented Jun 11, 2025

Sad that the <State><Plant> couldn't stay, but approved anyway!

@snowystinger snowystinger added this pull request to the merge queue Jun 11, 2025
Merged via the queue into main with commit 2c29e2d Jun 11, 2025
30 checks passed
@snowystinger snowystinger deleted the ts-more-explicit-modules branch June 11, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants