Skip to content

v0.2.1

Compare
Choose a tag to compare
@liximomo liximomo released this 26 Aug 09:48
  • 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 with import() #81.
  • Fix inject type declaration #83.