Releases: itsfrank/vue-typescript
Releases · itsfrank/vue-typescript
Member functions as default prop values
This update allows you to define default prop values for functions as member functions:
@VueComponent
export class Component extends Vue {
@Prop functionProp():number{
console.log('this is the default function);
return 10;
}
@Prop otherFuncProp:(a:string)=>void = function(a) {
console.log(a + 'this is also in the default function for this prop');
}
}
Fixing new and prop bugs
This version fixes two minor bugs:
- the new inconsistency - new noe creates a new component instance instead og returning a reference to the component constructor
- the falsy default prop bug - props with default value = false (not null or undefined) will now be handled properly.
Breaking Changes:
If using vue-typescript with vue-router, remove the new and brackets from the component object in your routes:
component: new MyComponent()
becomes: component: MyComponent
Feature Complete for components
Completed the implementation of all the features necessary to create syntatically valid vuejs components in typescript.
The release is not 1.0.0 because while i have unit tested all functinality, I plan on building a couple of sample apps to see if there are any inconsistencies with vanilla vuejs behaviour.
Features in this release:
- @vueComponent
- @prop
- @watch
- Computed properties with get/set