MCPcopy Create free account
hub / github.com/testing-library/user-event / isEditableInput

Function isEditableInput

src/utils/edit/isEditable.ts:35–45  ·  view source on GitHub ↗
(
  element: Element,
)

Source from the content-addressed store, hash-verified

33}
34
35export function isEditableInput(
36 element: Element,
37): element is HTMLInputElement & {
38 readOnly: false
39 type: editableInputTypes
40} {
41 return (
42 isElementType(element, 'input', {readOnly: false}) &&
43 Boolean(editableInputTypes[element.type as editableInputTypes])
44 )
45}

Callers 1

isEditableFunction · 0.85

Calls 1

isElementTypeFunction · 0.90

Tested by

no test coverage detected