- Declare your expected prop types directly in TypeScript:
import { createComponent, createElement as h } from '@vue/composition-api' interface Props { msg: string } const MyComponent = createComponent<Props>({ props: { msg: {} // required by vue 2 runtime }, setup(props) { return () => h('div', props.msg) } })
- Declare ref type in TypeScript:
const dateRef = ref<Date>(new Date);
- Fix
createComponent
not working withimport()
#81. - Fix
inject
type declaration #83.