Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jsx): improve target and formtarget attribute types #3299

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/jsx/intrinsic-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ export namespace JSX {
media?: string | undefined
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined
shape?: string | undefined
target?: string | undefined
target?: HTMLAttributeAnchorTarget | undefined
}

interface BaseHTMLAttributes extends HTMLAttributes {
href?: string | undefined
target?: string | undefined
target?: HTMLAttributeAnchorTarget | undefined
}

interface BlockquoteHTMLAttributes extends HTMLAttributes {
Expand All @@ -244,7 +244,7 @@ export namespace JSX {
formenctype?: string | undefined
formmethod?: string | undefined
formnovalidate?: boolean | undefined
formtarget?: string | undefined
formtarget?: HTMLAttributeAnchorTarget | undefined
name?: string | undefined
type?: 'submit' | 'reset' | 'button' | undefined
value?: string | ReadonlyArray<string> | number | undefined
Expand Down Expand Up @@ -304,7 +304,7 @@ export namespace JSX {
method?: string | undefined
name?: string | undefined
novalidate?: boolean | undefined
target?: string | undefined
target?: HTMLAttributeAnchorTarget | undefined

// React 19 compatibility
action?: string | Function | undefined
Expand Down Expand Up @@ -383,7 +383,7 @@ export namespace JSX {
formenctype?: string | undefined
formmethod?: string | undefined
formnovalidate?: boolean | undefined
formtarget?: string | undefined
formtarget?: HTMLAttributeAnchorTarget | undefined
height?: number | string | undefined
list?: string | undefined
max?: number | string | undefined
Expand Down