You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
814 B
25 lines
814 B
2 years ago
|
import { isContentEditable } from './isContentEditable';
|
||
|
declare type GuardedType<T> = T extends (x: any) => x is infer R ? R : never;
|
||
|
export declare function isEditable(element: Element): element is GuardedType<typeof isContentEditable> | GuardedType<typeof isEditableInput> | (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 {};
|