Skip to content
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

refactor: replace isInstanceOfElement #617

Merged
merged 1 commit into from Mar 24, 2021
Merged

refactor: replace isInstanceOfElement #617

merged 1 commit into from Mar 24, 2021

Conversation

ph-fritsche
Copy link
Member

What:

Replace utility isInstanceOfElement with isElementType.

Why:

The new helper utilizes HTMLElementTagNameMap which is currated in lib.dom.d.ts.
It is easier and less to type. The IDE provides suggestions for the tag parameter.
The result is a type guard that renders a lot of type casts obsolete and is more readable.

Checklist:

  • N/A Documentation
  • Tests
  • N/A Typings
  • Ready to be merged

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #617 (625faf3) into master (391e513) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #617   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines          887       874   -13     
  Branches       334       324   -10     
=========================================
- Hits           887       874   -13     
Impacted Files Coverage Δ
src/clear.ts 100.00% <100.00%> (ø)
src/click.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/arrow.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/character.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/control.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/functional.ts 100.00% <100.00%> (ø)
src/keyboard/plugins/index.ts 100.00% <100.00%> (ø)
src/keyboard/shared/fireInputEventIfNeeded.ts 100.00% <100.00%> (ø)
src/select-options.ts 100.00% <100.00%> (ø)
src/upload.ts 100.00% <100.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 391e513...625faf3. Read the comment docs.

@ph-fritsche ph-fritsche merged commit 7ff9a9a into master Mar 24, 2021
@ph-fritsche ph-fritsche deleted the refactor branch March 24, 2021 10:27
@github-actions
Copy link

🎉 This PR is included in version 13.0.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant