refactor(types): use stricter settings

fix #847
This commit is contained in:
Evan You
2020-03-23 11:08:22 -04:00
parent b3890a93e3
commit b8c1be18f3
27 changed files with 385 additions and 381 deletions

View File

@@ -10,7 +10,8 @@ import {
withDirectives,
Plugin,
ref,
getCurrentInstance
getCurrentInstance,
defineComponent
} from '@vue/runtime-test'
import { mockWarn } from '@vue/shared'
@@ -18,16 +19,16 @@ describe('api: createApp', () => {
mockWarn()
test('mount', () => {
const Comp = {
const Comp = defineComponent({
props: {
count: {
default: 0
}
},
setup(props: { count: number }) {
setup(props) {
return () => props.count
}
}
})
const root1 = nodeOps.createElement('div')
createApp(Comp).mount(root1)
@@ -47,16 +48,16 @@ describe('api: createApp', () => {
})
test('unmount', () => {
const Comp = {
const Comp = defineComponent({
props: {
count: {
default: 0
}
},
setup(props: { count: number }) {
setup(props) {
return () => props.count
}
}
})
const root = nodeOps.createElement('div')
const app = createApp(Comp)