Skip to content
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

Throw an error if JavaScript components receive the wrong type of $module #4035

Closed
1 task done
Tracked by #3478
romaricpascal opened this issue Aug 1, 2023 · 0 comments · Fixed by #4104
Closed
1 task done
Tracked by #3478

Throw an error if JavaScript components receive the wrong type of $module #4035

romaricpascal opened this issue Aug 1, 2023 · 0 comments · Fixed by #4104
Assignees
Milestone

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Aug 1, 2023

What

Update all components constructor to throw a TypeError an ElementError if the $module they receive is not of the right type.

Why

This is part of our work to have our components throw rather than silently return during initialisation.

JavaScript already provides a TypeError for this kind of situation, so we don't need to bring in a new error.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • All components have been updated to throw
@romaricpascal romaricpascal added awaiting triage Needs triaging by team javascript and removed awaiting triage Needs triaging by team labels Aug 1, 2023
@romaricpascal romaricpascal added this to the v5.0 milestone Aug 1, 2023
@romaricpascal romaricpascal moved this from Backlog 🗄 to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Aug 1, 2023
@romaricpascal romaricpascal moved this from Sprint Backlog 🏃🏼‍♀️ to Blocked ⛔ in GOV.UK Design System cycle board Aug 8, 2023
@romaricpascal romaricpascal moved this from Blocked ⛔ to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Aug 11, 2023
@romaricpascal romaricpascal moved this from Sprint Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Aug 15, 2023
@romaricpascal romaricpascal moved this from In progress 📝 to Needs review 🔍 in GOV.UK Design System cycle board Aug 18, 2023
@romaricpascal romaricpascal self-assigned this Aug 30, 2023
@romaricpascal romaricpascal moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board Sep 18, 2023
@36degrees 36degrees moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

1 participant