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

Mark internal classes and functions as @internal #4017

Closed
2 tasks done
Tracked by #3478
36degrees opened this issue Jul 28, 2023 · 2 comments · Fixed by #3958 or #4060
Closed
2 tasks done
Tracked by #3478

Mark internal classes and functions as @internal #4017

36degrees opened this issue Jul 28, 2023 · 2 comments · Fixed by #3958 or #4060
Milestone

Comments

@36degrees
Copy link
Contributor

36degrees commented Jul 28, 2023

What

Annotate all of our 'internal' classes or functions (like the I18n class and the mergeConfigs function) as @internal.

Remove any other access annotations (like @private) from classes and functions. (Individual properties within an @internal class can still be marked as private)

Why

This is part of our decision to reset the public JavaScript API.

When using access related annotations we want to be clearer about whether the annotation refers to:

  • access in context of the class – whether a particular method can be called from outside the class, including by other classes in GOV.UK Frontend
  • access in context of the library – whether a particular method is considered to be available for use outside of GOV.UK Frontend

Using @private, @protected and @public only for describing class-level access helps with this.

We can then use @internal (and potentially in the future the other release tags) for library level access annotations.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • All 'internal' classes and functions are marked as @internal
  • Other access annotations are removed from the class JSDoc and any internal functions
@colinrotherham
Copy link
Contributor

Related PR (and commit) regarding comment removal for @internal etc

@36degrees 36degrees self-assigned this Aug 7, 2023
@36degrees 36degrees moved this from Sprint Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Aug 7, 2023
@36degrees 36degrees moved this from In progress 📝 to Needs review 🔍 in GOV.UK Design System cycle board Aug 7, 2023
@36degrees 36degrees assigned colinrotherham and unassigned 36degrees Aug 7, 2023
@36degrees 36degrees linked a pull request Aug 7, 2023 that will close this issue
@colinrotherham
Copy link
Contributor

@romaricpascal romaricpascal moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board Aug 11, 2023
@colinrotherham colinrotherham removed their assignment Aug 23, 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