fix(types): allow `null` type for textarea value (#9997)

close #9904
This commit is contained in:
白雾三语 2024-01-08 22:58:27 +08:00 committed by GitHub
parent 7bd4e90506
commit c379bc29ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ expectType<JSX.Element>(<div />)
expectType<JSX.Element>(<div id="foo" />)
expectType<JSX.Element>(<div>hello</div>)
expectType<JSX.Element>(<input value="foo" />)
expectType<JSX.Element>(<textarea value={null} />)
// @ts-expect-error style css property validation
;<div style={{ unknown: 123 }} />

View File

@ -739,7 +739,7 @@ export interface TextareaHTMLAttributes extends HTMLAttributes {
readonly?: Booleanish
required?: Booleanish
rows?: Numberish
value?: string | ReadonlyArray<string> | number
value?: string | ReadonlyArray<string> | number | null
wrap?: string
}