Skip to content

Commit 58e2a94

Browse files
authored
fix(types): update jsx type definitions (#8607)
1 parent 17aa92b commit 58e2a94

File tree

1 file changed

+30
-7
lines changed
  • packages/runtime-dom/src

1 file changed

+30
-7
lines changed

packages/runtime-dom/src/jsx.ts

+30-7
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export interface ButtonHTMLAttributes extends HTMLAttributes {
377377
formtarget?: string
378378
name?: string
379379
type?: 'submit' | 'reset' | 'button'
380-
value?: string | string[] | number
380+
value?: string | ReadonlyArray<string> | number
381381
}
382382

383383
export interface CanvasHTMLAttributes extends HTMLAttributes {
@@ -395,11 +395,12 @@ export interface ColgroupHTMLAttributes extends HTMLAttributes {
395395
}
396396

397397
export interface DataHTMLAttributes extends HTMLAttributes {
398-
value?: string | string[] | number
398+
value?: string | ReadonlyArray<string> | number
399399
}
400400

401401
export interface DetailsHTMLAttributes extends HTMLAttributes {
402402
open?: Booleanish
403+
onToggle?: Event
403404
}
404405

405406
export interface DelHTMLAttributes extends HTMLAttributes {
@@ -443,13 +444,17 @@ export interface IframeHTMLAttributes extends HTMLAttributes {
443444
allow?: string
444445
allowfullscreen?: Booleanish
445446
allowtransparency?: Booleanish
447+
/** @deprecated */
446448
frameborder?: Numberish
447449
height?: Numberish
450+
/** @deprecated */
448451
marginheight?: Numberish
452+
/** @deprecated */
449453
marginwidth?: Numberish
450454
name?: string
451455
referrerpolicy?: HTMLAttributeReferrerPolicy
452456
sandbox?: string
457+
/** @deprecated */
453458
scrolling?: string
454459
seamless?: Booleanish
455460
src?: string
@@ -462,6 +467,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
462467
crossorigin?: 'anonymous' | 'use-credentials' | ''
463468
decoding?: 'async' | 'auto' | 'sync'
464469
height?: Numberish
470+
loading?: 'eager' | 'lazy'
465471
referrerpolicy?: HTMLAttributeReferrerPolicy
466472
sizes?: string
467473
src?: string
@@ -510,6 +516,14 @@ export interface InputHTMLAttributes extends HTMLAttributes {
510516
checked?: Booleanish | any[] | Set<any> // for IDE v-model multi-checkbox support
511517
crossorigin?: string
512518
disabled?: Booleanish
519+
enterKeyHint?:
520+
| 'enter'
521+
| 'done'
522+
| 'go'
523+
| 'next'
524+
| 'previous'
525+
| 'search'
526+
| 'send'
513527
form?: string
514528
formaction?: string
515529
formenctype?: string
@@ -553,7 +567,7 @@ export interface LabelHTMLAttributes extends HTMLAttributes {
553567
}
554568

555569
export interface LiHTMLAttributes extends HTMLAttributes {
556-
value?: string | string[] | number
570+
value?: string | ReadonlyArray<string> | number
557571
}
558572

559573
export interface LinkHTMLAttributes extends HTMLAttributes {
@@ -567,6 +581,7 @@ export interface LinkHTMLAttributes extends HTMLAttributes {
567581
rel?: string
568582
sizes?: string
569583
type?: string
584+
charset?: string
570585
}
571586

572587
export interface MapHTMLAttributes extends HTMLAttributes {
@@ -604,7 +619,7 @@ export interface MeterHTMLAttributes extends HTMLAttributes {
604619
max?: Numberish
605620
min?: Numberish
606621
optimum?: Numberish
607-
value?: string | string[] | number
622+
value?: string | ReadonlyArray<string> | number
608623
}
609624

610625
export interface QuoteHTMLAttributes extends HTMLAttributes {
@@ -649,16 +664,17 @@ export interface OutputHTMLAttributes extends HTMLAttributes {
649664

650665
export interface ParamHTMLAttributes extends HTMLAttributes {
651666
name?: string
652-
value?: string | string[] | number
667+
value?: string | ReadonlyArray<string> | number
653668
}
654669

655670
export interface ProgressHTMLAttributes extends HTMLAttributes {
656671
max?: Numberish
657-
value?: string | string[] | number
672+
value?: string | ReadonlyArray<string> | number
658673
}
659674

660675
export interface ScriptHTMLAttributes extends HTMLAttributes {
661676
async?: Booleanish
677+
/** @deprecated */
662678
charset?: string
663679
crossorigin?: string
664680
defer?: Booleanish
@@ -701,6 +717,7 @@ export interface TableHTMLAttributes extends HTMLAttributes {
701717
cellpadding?: Numberish
702718
cellspacing?: Numberish
703719
summary?: string
720+
width?: Numberish
704721
}
705722

706723
export interface TextareaHTMLAttributes extends HTMLAttributes {
@@ -717,7 +734,7 @@ export interface TextareaHTMLAttributes extends HTMLAttributes {
717734
readonly?: Booleanish
718735
required?: Booleanish
719736
rows?: Numberish
720-
value?: string | string[] | number
737+
value?: string | ReadonlyArray<string> | number
721738
wrap?: string
722739
}
723740

@@ -727,6 +744,9 @@ export interface TdHTMLAttributes extends HTMLAttributes {
727744
headers?: string
728745
rowspan?: Numberish
729746
scope?: string
747+
abbr?: string
748+
height?: Numberish
749+
width?: Numberish
730750
valign?: 'top' | 'middle' | 'bottom' | 'baseline'
731751
}
732752

@@ -736,6 +756,7 @@ export interface ThHTMLAttributes extends HTMLAttributes {
736756
headers?: string
737757
rowspan?: Numberish
738758
scope?: string
759+
abbr?: string
739760
}
740761

741762
export interface TimeHTMLAttributes extends HTMLAttributes {
@@ -756,6 +777,7 @@ export interface VideoHTMLAttributes extends MediaHTMLAttributes {
756777
poster?: string
757778
width?: Numberish
758779
disablePictureInPicture?: Booleanish
780+
disableRemotePlayback?: Booleanish
759781
}
760782

761783
export interface WebViewHTMLAttributes extends HTMLAttributes {
@@ -804,6 +826,7 @@ export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
804826
// Other HTML properties supported by SVG elements in browsers
805827
role?: string
806828
tabindex?: Numberish
829+
crossOrigin?: 'anonymous' | 'use-credentials' | ''
807830

808831
// SVG Specific attributes
809832
'accent-height'?: Numberish

0 commit comments

Comments
 (0)