Add `undefined` as a valid value for `value`.

Explicitly add undefined as a valid value for value so it will be valid for Typescript project that enable exactOptionalPropertyTypes[1].

[1] https://www.typescriptlang.org/tsconfig#exactOptionalPropertyTypes

This code is not valid using the current types.

const [value, setValue] = useState<Value | undefined>();

<Input value={value} onChange={setValue}/>

Merge request reports

Loading