chore: optimize initDefaultProps type

pull/3067/head
Amour1688 2020-10-28 15:46:00 +08:00
parent d96a10dce8
commit d0429737bd
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { PropType } from 'vue';
import { VueTypeValidableDef, VueTypeDef } from 'vue-types';
const initDefaultProps = <T>(
@ -7,6 +8,8 @@ const initDefaultProps = <T>(
? U
: T[K] extends VueTypeDef<infer U>
? U
: T[K] extends { type: PropType<infer U> }
? U
: any;
},
): T => {