Skip to content

Commit

Permalink
fix(types): allow null type for textarea value (#9997)
Browse files Browse the repository at this point in the history
close #9904
  • Loading branch information
baiwusanyu-c authored Jan 8, 2024
1 parent 7bd4e90 commit c379bc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/dts-test/tsx.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} />
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-dom/src/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c379bc2

Please sign in to comment.