feat(web-components): update second half of web-components files to resolve strict mode errors #3329
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.
Summary of the changes
Update second half of the web-components files to resolve strict mode errors (first half has been completed: #3328). Also added some unit tests as the changes brought the coverage below 80%.
Update: also added a new
IcMultiValueEventDetail
type to resolve ticket #3349 (have updated ic-select + ic-menu files to use this, and also one instance in ic-search-bar, as it uses ic-menu).I have added the non-null assertion operator (!) after some variables. This is because those variables are component props which have a default value; the TypeScript strict mode checking doesn't seem to detect that these default values exist.
I will create a separate PR to actually enable TypeScript mode. (Enabling TypeScript mode causes
| undefined
to be added to every optional prop in the component readme files - want to avoid loads of changes in this PR so GitHub doesn't become really slow when viewing them).Related issue
#266
Checklist
General
Testing
Accessibility
Resize/zoom behaviour
System modes
Testing content extremes