Skip to content

Commit 5a41231

Browse files
committed
chore: fix formatting + remove duplicated property in jsx type
1 parent b71a889 commit 5a41231

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

packages/dts-test/tsx.test-d.tsx

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,15 @@ expectType<JSX.Element>(
1818
)
1919

2020
// #7955
21-
expectType<JSX.Element>(
22-
<div style={[undefined, '', null, false]} />
23-
)
21+
expectType<JSX.Element>(<div style={[undefined, '', null, false]} />)
2422

25-
expectType<JSX.Element>(
26-
<div style={undefined} />
27-
)
23+
expectType<JSX.Element>(<div style={undefined} />)
2824

29-
expectType<JSX.Element>(
30-
<div style={null} />
31-
)
25+
expectType<JSX.Element>(<div style={null} />)
3226

33-
expectType<JSX.Element>(
34-
<div style={''} />
35-
)
27+
expectType<JSX.Element>(<div style={''} />)
3628

37-
expectType<JSX.Element>(
38-
<div style={false} />
39-
)
29+
expectType<JSX.Element>(<div style={false} />)
4030

4131
// @ts-expect-error
4232
;<div style={[0]} />

packages/runtime-dom/src/jsx.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,13 @@ interface AriaAttributes {
244244
}
245245

246246
// Vue's style normalization supports nested arrays
247-
export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>
247+
export type StyleValue =
248+
| false
249+
| null
250+
| undefined
251+
| string
252+
| CSSProperties
253+
| Array<StyleValue>
248254

249255
export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
250256
innerHTML?: string
@@ -474,7 +480,6 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
474480
srcset?: string
475481
usemap?: string
476482
width?: Numberish
477-
loading?: 'lazy' | 'eager'
478483
}
479484

480485
export interface InsHTMLAttributes extends HTMLAttributes {

0 commit comments

Comments
 (0)