Skip to content

Commit c379bc2

Browse files
authored
fix(types): allow null type for textarea value (#9997)
close #9904
1 parent 7bd4e90 commit c379bc2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/dts-test/tsx.test-d.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ expectType<JSX.Element>(<div />)
77
expectType<JSX.Element>(<div id="foo" />)
88
expectType<JSX.Element>(<div>hello</div>)
99
expectType<JSX.Element>(<input value="foo" />)
10+
expectType<JSX.Element>(<textarea value={null} />)
1011

1112
// @ts-expect-error style css property validation
1213
;<div style={{ unknown: 123 }} />

packages/runtime-dom/src/jsx.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ export interface TextareaHTMLAttributes extends HTMLAttributes {
739739
readonly?: Booleanish
740740
required?: Booleanish
741741
rows?: Numberish
742-
value?: string | ReadonlyArray<string> | number
742+
value?: string | ReadonlyArray<string> | number | null
743743
wrap?: string
744744
}
745745

0 commit comments

Comments
 (0)