chore: vue-types add `style` and `VNodeChild`

pull/2992/head
Amour1688 2020-10-12 19:19:50 +08:00
parent 3f31590ad4
commit 382e9b5de0
1 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import { CSSProperties, VNodeTypes } from 'vue';
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types'; import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
const PropTypes = createTypes({ const PropTypes = createTypes({
func: undefined, func: undefined,
@ -16,6 +17,17 @@ PropTypes.extend([
type: Boolean, type: Boolean,
default: undefined, default: undefined,
}, },
{
name: 'style',
getter: true,
type: [String, Object],
default: undefined,
},
{
name: 'VNodeChild',
getter: true,
type: null,
},
]); ]);
export function withUndefined(type: any) { export function withUndefined(type: any) {
@ -25,6 +37,8 @@ export function withUndefined(type: any) {
export default PropTypes as VueTypesInterface & { export default PropTypes as VueTypesInterface & {
readonly looseBool: VueTypeValidableDef<boolean> & { readonly looseBool: VueTypeValidableDef<boolean> & {
default: boolean; default: undefined;
}; };
readonly style: VueTypeValidableDef<CSSProperties>;
readonly VNodeChild: VueTypeValidableDef<VNodeTypes>;
}; };