Skip to content

Commit

Permalink
Make sure that the global document is never used
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Feb 19, 2024
1 parent aeadec8 commit 9670bd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Make sure that the global document is never used
declare const document: never;

function isNativeField(field: HTMLElement): field is HTMLInputElement | HTMLTextAreaElement {
return field instanceof HTMLInputElement || field instanceof HTMLTextAreaElement;
}
Expand Down

0 comments on commit 9670bd3

Please sign in to comment.