Skip to content

Commit 0cf3f78

Browse files
committed
test(types): also test Object as PropType casting
1 parent 026eb72 commit 0cf3f78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test-dts/defineComponent.test-d.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('with object props', () => {
1515
e?: Function
1616
bb: string
1717
cc?: string[] | undefined
18-
dd: string[]
18+
dd: { n: 1 }
1919
ee?: () => string
2020
ff?: (a: number, b: string) => { a: boolean }
2121
ccc?: string[] | undefined
@@ -43,7 +43,7 @@ describe('with object props', () => {
4343
cc: Array as PropType<string[]>,
4444
// required + type casting
4545
dd: {
46-
type: Array as PropType<string[]>,
46+
type: Object as PropType<{ n: 1 }>,
4747
required: true
4848
},
4949
// return type
@@ -152,7 +152,7 @@ describe('with object props', () => {
152152
bb="bb"
153153
e={() => {}}
154154
cc={['cc']}
155-
dd={['dd']}
155+
dd={{ n: 1 }}
156156
ee={() => 'ee'}
157157
ccc={['ccc']}
158158
ddd={['ddd']}

0 commit comments

Comments
 (0)