File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,33 @@ expectType<JSX.Element>(
17
17
< div style = { [ { color : 'red' } , [ { fontSize : '1em' } ] ] } />
18
18
)
19
19
20
+ // #7955
21
+ expectType < JSX . Element > (
22
+ < div style = { [ undefined , '' , null , false ] } />
23
+ )
24
+
25
+ expectType < JSX . Element > (
26
+ < div style = { undefined } />
27
+ )
28
+
29
+ expectType < JSX . Element > (
30
+ < div style = { null } />
31
+ )
32
+
33
+ expectType < JSX . Element > (
34
+ < div style = { '' } />
35
+ )
36
+
37
+ expectType < JSX . Element > (
38
+ < div style = { false } />
39
+ )
40
+
41
+ // @ts -expect-error
42
+ ; < div style = { [ 0 ] } />
43
+
44
+ // @ts -expect-error
45
+ ; < div style = { 0 } />
46
+
20
47
// @ts -expect-error unknown prop
21
48
; < div foo = "bar" />
22
49
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ interface AriaAttributes {
244
244
}
245
245
246
246
// Vue's style normalization supports nested arrays
247
- export type StyleValue = string | CSSProperties | Array < StyleValue >
247
+ export type StyleValue = false | null | undefined | string | CSSProperties | Array < StyleValue >
248
248
249
249
export interface HTMLAttributes extends AriaAttributes , EventHandlers < Events > {
250
250
innerHTML ?: string
You can’t perform that action at this time.
0 commit comments