From: Evan You Date: Fri, 3 Apr 2020 13:29:21 +0000 (-0400) Subject: test(types): also test Object as PropType casting X-Git-Tag: v3.0.0-alpha.11~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cf3f78134663342cf327eaf5c93001dc5885397;p=thirdparty%2Fvuejs%2Fcore.git test(types): also test Object as PropType casting --- diff --git a/test-dts/defineComponent.test-d.tsx b/test-dts/defineComponent.test-d.tsx index 6838e6db2f..07ee8dcc00 100644 --- a/test-dts/defineComponent.test-d.tsx +++ b/test-dts/defineComponent.test-d.tsx @@ -15,7 +15,7 @@ describe('with object props', () => { e?: Function bb: string cc?: string[] | undefined - dd: string[] + dd: { n: 1 } ee?: () => string ff?: (a: number, b: string) => { a: boolean } ccc?: string[] | undefined @@ -43,7 +43,7 @@ describe('with object props', () => { cc: Array as PropType, // required + type casting dd: { - type: Array as PropType, + type: Object as PropType<{ n: 1 }>, required: true }, // return type @@ -152,7 +152,7 @@ describe('with object props', () => { bb="bb" e={() => {}} cc={['cc']} - dd={['dd']} + dd={{ n: 1 }} ee={() => 'ee'} ccc={['ccc']} ddd={['ddd']}