(mutationList: MutationRecord[], tagName: string)
| 18 | }; |
| 19 | |
| 20 | const getSelectedOption = <T extends HTMLElement>(mutationList: MutationRecord[], tagName: string): T | undefined => { |
| 21 | let newOption: T | undefined; |
| 22 | mutationList.forEach((mut) => { |
| 23 | // eslint-disable-next-line @typescript-eslint/prefer-for-of |
| 24 | for (let i = 0; i < mut.addedNodes.length; i++) { |
| 25 | newOption = findCheckedOption<T>(mut.addedNodes[i], tagName) || newOption; |
| 26 | } |
| 27 | }); |
| 28 | return newOption; |
| 29 | }; |
| 30 | |
| 31 | /** |
| 32 | * The "value" key is only set on some components such as ion-select-option. |
no test coverage detected