package.dist.utils.edit.isEditable.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of user-event Show documentation
Show all versions of user-event Show documentation
Fire events the same way the user does
The newest version!
import { isContentEditable } from './isContentEditable';
declare type GuardedType = T extends (x: any) => x is infer R ? R : never;
export declare function isEditable(element: Element): element is GuardedType | GuardedType | (HTMLTextAreaElement & {
readOnly: false;
});
export declare enum editableInputTypes {
'text' = "text",
'date' = "date",
'datetime-local' = "datetime-local",
'email' = "email",
'month' = "month",
'number' = "number",
'password' = "password",
'search' = "search",
'tel' = "tel",
'time' = "time",
'url' = "url",
'week' = "week"
}
export declare function isEditableInput(element: Element): element is HTMLInputElement & {
readOnly: false;
type: editableInputTypes;
};
export {};