Skip to content

Commit

Permalink
Merge pull request #26473 from software-mansion-labs/ts-migration/is-…
Browse files Browse the repository at this point in the history
…input-auto-filled

[No QA] [TS migration] Migrate 'isInputAutoFilled.js' lib to TypeScript
  • Loading branch information
jasperhuangg authored Sep 11, 2023
2 parents 9d8518a + cf7220c commit 95a0edc
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import isSelectorSupported from './isSelectorSupported';

/**
* Check the input is auto filled or not
* @param {Object} input
* @return {Boolean}
*/
export default function isInputAutoFilled(input) {
if (!input || !input.matches) return false;
export default function isInputAutoFilled(input: Element): boolean {
if (!input?.matches) return false;
if (isSelectorSupported(':autofill')) {
return input.matches(':-webkit-autofill') || input.matches(':autofill');
}
Expand Down

0 comments on commit 95a0edc

Please sign in to comment.