-
Notifications
You must be signed in to change notification settings - Fork 325
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
Various JSDoc + type checking fixes (for v4.4.0 only) #2997
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f60b999
Remove `i18n.${lookupKey}` usage from tests
colinrotherham adcc8a2
Code fixes for I18n, Accordion, Character count
colinrotherham 006f512
Update JSDoc for I18n, Accordion, Character count
colinrotherham ddc6c1e
Ensure JSDoc plural form `other` is optional (with caveats)
colinrotherham cab5c36
Use config type definitions for `initAll`
colinrotherham a80ecde
Add JSDoc links to default translations
colinrotherham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,7 @@ import Tabs from './components/tabs/tabs.mjs' | |
* Use the `data-module` attributes to find, instantiate and init all of the | ||
* components provided as part of GOV.UK Frontend. | ||
* | ||
* @param {object} [config] - Config | ||
* @param {HTMLElement} [config.scope=document] - Scope to query for components | ||
* @param {object} [config.accordion] - Accordion config | ||
* @param {object} [config.button] - Button config | ||
* @param {object} [config.characterCount] - Character Count config | ||
* @param {object} [config.errorSummary] - Error Summary config | ||
* @param {object} [config.notificationBanner] - Notification Banner config | ||
* @param {Config} [config] - Config for all components | ||
*/ | ||
function initAll (config) { | ||
config = typeof config !== 'undefined' ? config : {} | ||
|
@@ -103,3 +97,15 @@ export { | |
SkipLink, | ||
Tabs | ||
} | ||
|
||
/** | ||
* Config for all components | ||
* | ||
* @typedef {object} Config | ||
* @property {HTMLElement} [scope=document] - Scope to query for components | ||
* @property {import('./components/accordion/accordion.mjs').AccordionConfig} [accordion] - Accordion config | ||
* @property {import('./components/button/button.mjs').ButtonConfig} [button] - Button config | ||
* @property {import('./components/character-count/character-count.mjs').CharacterCountConfig} [characterCount] - Character Count config | ||
* @property {import('./components/error-summary/error-summary.mjs').ErrorSummaryConfig} [errorSummary] - Error Summary config | ||
* @property {import('./components/notification-banner/notification-banner.mjs').NotificationBannerConfig} [notificationBanner] - Notification Banner config | ||
*/ | ||
Comment on lines
+101
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yeah, we were so focused on the individual components that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not used
@see
or@link
yet to other areas of the code but we're ready for it now