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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

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! 🎉

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.

3 participants