File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,34 @@ expectType<JSX.Element>(<div style={[{ color: 'red' }]} />)
15
15
expectType < JSX . Element > (
16
16
< div style = { [ { color : 'red' } , [ { fontSize : '1em' } ] ] } />
17
17
)
18
+
19
+ // #7955
18
20
expectType < JSX . Element > (
19
- < div style = { [ undefined , { background : 'green' } ] } />
21
+ < div style = { [ undefined , '' , null , false ] } />
20
22
)
21
23
24
+ expectType < JSX . Element > (
25
+ < div style = { undefined } />
26
+ )
27
+
28
+ expectType < JSX . Element > (
29
+ < div style = { null } />
30
+ )
31
+
32
+ expectType < JSX . Element > (
33
+ < div style = { '' } />
34
+ )
35
+
36
+ expectType < JSX . Element > (
37
+ < div style = { false } />
38
+ )
39
+
40
+ // @ts -expect-error
41
+ ; < div style = { [ 0 ] } />
42
+
43
+ // @ts -expect-error
44
+ ; < div style = { 0 } />
45
+
22
46
// @ts -expect-error unknown prop
23
47
; < div foo = "bar" />
24
48
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