fix: ts error

This commit is contained in:
Amour1688 2020-10-12 13:49:27 +08:00
parent 5d4a501bfe
commit e9aa278b20
2 changed files with 7 additions and 7 deletions

View File

@ -393,10 +393,10 @@ describe('PatchFlags', () => {
}); });
describe('variables outside slots', () => { describe('variables outside slots', () => {
interface AProps { const A = defineComponent({
inc: () => void props: {
} inc: Function,
const A = defineComponent<AProps>({ },
render() { render() {
return this.$slots.default?.(); return this.$slots.default?.();
}, },
@ -405,7 +405,7 @@ describe('variables outside slots', () => {
A.inheritAttrs = false; A.inheritAttrs = false;
test('internal', async () => { test('internal', async () => {
const wrapper = mount({ const wrapper = mount(defineComponent({
data() { data() {
return { return {
val: 0, val: 0,
@ -429,7 +429,7 @@ describe('variables outside slots', () => {
</A> </A>
); );
}, },
}); }));
expect(wrapper.get('#textarea').element.innerHTML).toBe('0'); expect(wrapper.get('#textarea').element.innerHTML).toBe('0');
await wrapper.get('#button').trigger('click'); await wrapper.get('#button').trigger('click');