generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core)!: merge
MaskitoElementPredicate
& `MaskitoElementPredica…
…teAsync` into single type (#757)
- Loading branch information
1 parent
4495942
commit 640a631
Showing
10 changed files
with
20 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import {MaskitoElementPredicate} from '../types'; | ||
|
||
export const MASKITO_DEFAULT_ELEMENT_PREDICATE: MaskitoElementPredicate = e => | ||
e.querySelector('input,textarea') || (e as HTMLInputElement | HTMLTextAreaElement); | ||
e.querySelector<HTMLInputElement | HTMLTextAreaElement>('input,textarea') || | ||
(e as HTMLInputElement | HTMLTextAreaElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
export type MaskitoElementPredicate = ( | ||
element: HTMLElement, | ||
) => HTMLInputElement | HTMLTextAreaElement; // TODO: add `Promise<HTMLInputElement | HTMLTextAreaElement>` | ||
|
||
// TODO: delete in v2.0 | ||
export type MaskitoElementPredicateAsync = ( | ||
element: HTMLElement, | ||
) => Promise<HTMLInputElement | HTMLTextAreaElement>; | ||
) => | ||
| HTMLInputElement | ||
| HTMLTextAreaElement | ||
| Promise<HTMLInputElement | HTMLTextAreaElement>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters