<div style={[{ color: 'red' }, [{ fontSize: '1em' }]]} />
)
+// #7955
+expectType<JSX.Element>(
+ <div style={[undefined, '', null, false]} />
+)
+
+expectType<JSX.Element>(
+ <div style={undefined} />
+)
+
+expectType<JSX.Element>(
+ <div style={null} />
+)
+
+expectType<JSX.Element>(
+ <div style={''} />
+)
+
+expectType<JSX.Element>(
+ <div style={false} />
+)
+
+// @ts-expect-error
+;<div style={[0]} />
+
+// @ts-expect-error
+;<div style={0} />
+
// @ts-expect-error unknown prop
;<div foo="bar" />
}
// Vue's style normalization supports nested arrays
-export type StyleValue = string | CSSProperties | Array<StyleValue>
+export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>
export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
innerHTML?: string