Skip to content

Commit d042973

Browse files
committed
chore: optimize initDefaultProps type
1 parent d96a10d commit d042973

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/_util/props-util/initDefaultProps.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { PropType } from 'vue';
12
import { VueTypeValidableDef, VueTypeDef } from 'vue-types';
23

34
const initDefaultProps = <T>(
@@ -7,6 +8,8 @@ const initDefaultProps = <T>(
78
? U
89
: T[K] extends VueTypeDef<infer U>
910
? U
11+
: T[K] extends { type: PropType<infer U> }
12+
? U
1013
: any;
1114
},
1215
): T => {

0 commit comments

Comments
 (0)