]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): allow style to be an array in JSX (#2947)
authorKadir Yazıcı <47540799+kadiryazici@users.noreply.github.com>
Mon, 1 Mar 2021 17:29:13 +0000 (20:29 +0300)
committerGitHub <noreply@github.com>
Mon, 1 Mar 2021 17:29:13 +0000 (12:29 -0500)
packages/runtime-dom/types/jsx.d.ts

index 8a2b17f0056fb7a5fce034efbf07716865ed06ed..f070ffdc87c5f230746a2fe14ad05df2d53c0c1a 100644 (file)
@@ -245,11 +245,14 @@ interface AriaAttributes {
   'aria-valuetext'?: string
 }
 
+// Vue's style normalization supports nested arrays
+type StyleValue = string | CSSProperties | Array<StyleValue>
+
 export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
   innerHTML?: string
 
   class?: any
-  style?: string | CSSProperties
+  style?: StyleValue
 
   // Standard HTML Attributes
   accesskey?: string