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 Jan 18, 2023
1 parent eb1cb32 commit 39b22e6
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 @@ -140,6 +140,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 @@ -173,6 +174,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 @@ -235,6 +235,7 @@ Tabs.prototype.getTab = function (hash) {
return
}

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

Expand Down

0 comments on commit 39b22e6

Please sign in to comment.