chore: optimize initDefaultProps type
parent
d96a10dce8
commit
d0429737bd
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue