前端爱码士
2023-02-27 4f4bec0c22f113ee7dccc3260d3dd48bca44c9c0
提交 | 用户 | age
73c8e0 1 import { CSSProperties, VNodeChild } from 'vue';
V 2 import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
3
ebf7c8 4 export type VueNode = VNodeChild | JSX.Element;
73c8e0 5
V 6 type PropTypes = VueTypesInterface & {
7   readonly style: VueTypeValidableDef<CSSProperties>;
8   readonly VNodeChild: VueTypeValidableDef<VueNode>;
9   // readonly trueBool: VueTypeValidableDef<boolean>;
10 };
11
12 const propTypes = createTypes({
13   func: undefined,
14   bool: undefined,
15   string: undefined,
16   number: undefined,
17   object: undefined,
18   integer: undefined,
19 }) as PropTypes;
20
21 propTypes.extend([
22   {
23     name: 'style',
24     getter: true,
25     type: [String, Object],
26     default: undefined,
27   },
28   {
29     name: 'VNodeChild',
30     getter: true,
31     type: undefined,
32   },
33 ]);
34 export { propTypes };