Na minha reagir e aplicativo original datilografado, eu uso: onChange={(e) => data.motto = (e.target as any).value}.
Como defino corretamente as digitações para a classe, para que eu não precise me intrometer no sistema de tipos any?
export interface InputProps extends React.HTMLProps<Input> {
...
}
export class Input extends React.Component<InputProps, {}> {
}
Se eu colocar target: { value: string };, recebo:
ERROR in [default] /react-onsenui.d.ts:87:18
Interface 'InputProps' incorrectly extends interface 'HTMLProps<Input>'.
Types of property 'target' are incompatible.
Type '{ value: string; }' is not assignable to type 'string'.
