|
|
@@ -12,6 +12,15 @@ expectType<JSX.Element>(<div />)
|
|
|
expectType<JSX.Element>(<div id="foo" />)
|
|
|
expectType<JSX.Element>(<input value="foo" />)
|
|
|
|
|
|
+// @ts-expect-error style css property validation
|
|
|
+expectError(<div style={{ unknown: 123 }} />)
|
|
|
+
|
|
|
+// allow array styles and nested array styles
|
|
|
+expectType<JSX.Element>(<div style={[{ color: 'red' }]} />)
|
|
|
+expectType<JSX.Element>(
|
|
|
+ <div style={[{ color: 'red' }, [{ fontSize: '1em' }]]} />
|
|
|
+)
|
|
|
+
|
|
|
// @ts-expect-error unknown prop
|
|
|
expectError(<div foo="bar" />)
|
|
|
|