NumericInput inherits from TextInput. This is awkward from a types perspective because a TextInput has a value of type string but a NumericInput has a value of type number.
A better inheritance hierarchy would be:
Element
|--InputElement (abstract base class that creates + manages the input DOM element)
|--TextInput
|--NumericInput
...where each TextInput and NumericInput reads/validates/types the actual textual entry of the input element.
NumericInput
inherits fromTextInput
. This is awkward from a types perspective because aTextInput
has a value of typestring
but aNumericInput
has a value of typenumber
.A better inheritance hierarchy would be:
...where each
TextInput
andNumericInput
reads/validates/types the actual textual entry of the input element.