fix: ts error

This commit is contained in:
Amour1688 2020-10-10 20:53:50 +08:00
parent 61ef8e6883
commit 4c9d3161fd
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import { createTypes } from 'vue-types';
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
const PropTypes = createTypes({
func: undefined,
bool: undefined,
@ -8,6 +8,7 @@ const PropTypes = createTypes({
object: undefined,
integer: undefined,
});
PropTypes.extend([
{
name: 'looseBool',
@ -16,9 +17,14 @@ PropTypes.extend([
default: undefined,
},
]);
export function withUndefined(type: any) {
type.default = undefined;
return type;
}
export default PropTypes;
export default PropTypes as VueTypesInterface & {
readonly looseBool: VueTypeValidableDef<boolean> & {
default: boolean;
};
};

View File

@ -1,4 +1,4 @@
import { nextTick, inject } from 'vue';
import { nextTick, inject, defineComponent } from 'vue';
import TransitionEvents from './css-animation/Event';
import raf from './raf';
import { defaultConfigProvider } from '../config-provider';
@ -20,7 +20,7 @@ function isNotGrey(color) {
}
return true;
}
export default {
export default defineComponent({
name: 'Wave',
props: ['insertExtraNode'],
mounted() {
@ -171,4 +171,4 @@ export default {
}
return this.$slots.default && this.$slots.default()[0];
},
};
});