Skip to content

Commit

Permalink
Add @ts-expect-error to incorrect NodeList types
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Dec 19, 2022
1 parent 0beffc7 commit 2992838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/govuk/components/checkboxes/checkboxes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Checkboxes.prototype.unCheckAllInputsExcept = function ($input) {
var allInputsWithSameName = document.querySelectorAll('input[type="checkbox"][name="' + $input.name + '"]')

nodeListForEach(
// @ts-expect-error `NodeListOf<HTMLInputElement>` type expected
allInputsWithSameName,

/**
Expand Down Expand Up @@ -171,6 +172,7 @@ Checkboxes.prototype.unCheckExclusiveInputs = function ($input) {
)

nodeListForEach(
// @ts-expect-error `NodeListOf<HTMLInputElement>` type expected
allInputsWithSameNameAndExclusiveBehaviour,

/**
Expand Down
1 change: 1 addition & 0 deletions src/govuk/components/tabs/tabs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ Tabs.prototype.getTab = function (hash) {
return
}

// @ts-expect-error `HTMLAnchorElement` type expected
return $tab
}

Expand Down

0 comments on commit 2992838

Please sign in to comment.