In an effort to provide a better, safer and more accurate developer experience, I worked on typescript definitions.
Missing component types
Exposed missing component types using the provided command. This could be automated as part of the deployment.
TextInput
TextInput has a textarea boolean property, which generates the underlying element as input or textarea. Those have different properties. Textarea, for example, has a rows property defining how many rows are displayed. Depending on the value of textarea, TextInput will extend either InputHTMLElement or TextareaHTMLElement properties. No need for event handlers as well like onChange or onBlur, they will be forwarded natively..
Alert
This component was missing the type warning, which is present in the official DS FR.
Checkbox
Checkbox was missing checked and other properties that should be controllable e.g. using a select-all checkbox. These properties were not available to TypeScript, although being treated by the component.
Checkbox now extends InputHTMLElement to automatically provide its properties, while being able to add some more. It omits type, which always equals checkbox in the underlying component.
In an effort to provide a better, safer and more accurate developer experience, I worked on typescript definitions.
Missing component types
Exposed missing component types using the provided command. This could be automated as part of the deployment.
TextInput
TextInput has a
textarea
boolean property, which generates the underlying element asinput
ortextarea
. Those have different properties. Textarea, for example, has arows
property defining how many rows are displayed. Depending on the value oftextarea
, TextInput will extend eitherInputHTMLElement
orTextareaHTMLElement
properties. No need for event handlers as well likeonChange
oronBlur
, they will be forwarded natively..Alert
This component was missing the type
warning
, which is present in the official DS FR.Checkbox
Checkbox was missing
checked
and other properties that should be controllable e.g. using a select-all checkbox. These properties were not available to TypeScript, although being treated by the component.Checkbox now extends InputHTMLElement to automatically provide its properties, while being able to add some more. It omits
type
, which always equalscheckbox
in the underlying component.Closes #298