test(types): also test Object as PropType casting
This commit is contained in:
parent
026eb729f3
commit
0cf3f78134
@ -15,7 +15,7 @@ describe('with object props', () => {
|
|||||||
e?: Function
|
e?: Function
|
||||||
bb: string
|
bb: string
|
||||||
cc?: string[] | undefined
|
cc?: string[] | undefined
|
||||||
dd: string[]
|
dd: { n: 1 }
|
||||||
ee?: () => string
|
ee?: () => string
|
||||||
ff?: (a: number, b: string) => { a: boolean }
|
ff?: (a: number, b: string) => { a: boolean }
|
||||||
ccc?: string[] | undefined
|
ccc?: string[] | undefined
|
||||||
@ -43,7 +43,7 @@ describe('with object props', () => {
|
|||||||
cc: Array as PropType<string[]>,
|
cc: Array as PropType<string[]>,
|
||||||
// required + type casting
|
// required + type casting
|
||||||
dd: {
|
dd: {
|
||||||
type: Array as PropType<string[]>,
|
type: Object as PropType<{ n: 1 }>,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
// return type
|
// return type
|
||||||
@ -152,7 +152,7 @@ describe('with object props', () => {
|
|||||||
bb="bb"
|
bb="bb"
|
||||||
e={() => {}}
|
e={() => {}}
|
||||||
cc={['cc']}
|
cc={['cc']}
|
||||||
dd={['dd']}
|
dd={{ n: 1 }}
|
||||||
ee={() => 'ee'}
|
ee={() => 'ee'}
|
||||||
ccc={['ccc']}
|
ccc={['ccc']}
|
||||||
ddd={['ddd']}
|
ddd={['ddd']}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user