npm @vue/composition-api 0.2.1
v0.2.1

latest releases: 1.7.2, 1.7.1, 1.7.0...
5 years ago
  • 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.

Don't miss a new composition-api release

NewReleases is sending notifications on new releases.