Skip to content
Myr

feat(jsx): improve form attribute types (#3330)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by TOMIKAWA Sotaro · committed by GitHub · parent bc2b7cf · Browse files · 1 file+18 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+18 added−8 removed

  • other:+18 added−8 removed

1 file+18 added−8 removed

modified:src/jsx/intrinsic-elements.ts+18 added-8 removed
243 unmodified lines
244245 interface ButtonHTMLAttributes extends HTMLAttributes {246 disabled?: boolean | undefined247 form?: string | undefined248 formenctype?: string | undefined249 formmethod?: string | undefined248 formenctype?: HTMLAttributeFormEnctype | undefined249 formmethod?: HTMLAttributeFormMethod | undefined250 formnovalidate?: boolean | undefined251 formtarget?: HTMLAttributeAnchorTarget | undefined252 name?: string | undefined253 type?: 'submit' | 'reset' | 'button' | undefined
48 unmodified lines
302 form?: string | undefined303 name?: string | undefined304 }305306 /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#method */307 type HTMLAttributeFormMethod = 'get' | 'post' | 'dialog'308 /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#enctype */309 type HTMLAttributeFormEnctype =310 | 'application/x-www-form-urlencoded'311 | 'multipart/form-data'312 | 'text/plain'313 /** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#autocomplete */314 type HTMLAttributeFormAutocomplete = 'on' | 'off'315316 interface FormHTMLAttributes extends HTMLAttributes {307 'accept-charset'?: string | undefined308 autocomplete?: string | undefined309 enctype?: string | undefined310 method?: string | undefined317 'accept-charset'?: StringLiteralUnion<'utf-8'> | undefined318 autocomplete?: HTMLAttributeFormAutocomplete | undefined319 enctype?: HTMLAttributeFormEnctype | undefined320 method?: HTMLAttributeFormMethod | undefined321 name?: string | undefined322 novalidate?: boolean | undefined323 target?: HTMLAttributeAnchorTarget | undefined324
130 unmodified lines
455 capture?: boolean | 'user' | 'environment' | undefined // https://www.w3.org/TR/html-media-capture/#the-capture-attribute456 checked?: boolean | undefined457 disabled?: boolean | undefined458 form?: string | undefined449 formenctype?: string | undefined450 formmethod?: string | undefined459 formenctype?: HTMLAttributeFormEnctype | undefined460 formmethod?: HTMLAttributeFormMethod | undefined461 formnovalidate?: boolean | undefined462 formtarget?: HTMLAttributeAnchorTarget | undefined463 height?: number | string | undefined464 list?: string | undefined
460 unmodified lines