File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,34 @@ expectType<JSX.Element>(<div style={[{ color: 'red' }]} />)
16
16
expectType < JSX . Element > (
17
17
< div style = { [ { color : 'red' } , [ { fontSize : '1em' } ] ] } />
18
18
)
19
+
20
+ // #7955
19
21
expectType < JSX . Element > (
20
- < div style = { [ undefined , { background : 'green' } ] } />
22
+ < div style = { [ undefined , '' , null , false ] } />
21
23
)
22
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
+
23
47
// @ts -expect-error unknown prop
24
48
; < div foo = "bar" />
25
49
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ interface AriaAttributes {
234
234
}
235
235
236
236
// Vue's style normalization supports nested arrays
237
- export type StyleValue = undefined | string | CSSProperties | Array < StyleValue >
237
+ export type StyleValue = false | null | undefined | string | CSSProperties | Array < StyleValue >
238
238
239
239
export interface HTMLAttributes extends AriaAttributes , EventHandlers < Events > {
240
240
innerHTML ?: string
You can’t perform that action at this time.
0 commit comments