I'm getting an typescript error when using vue.js with the moment.js library with vue decorators. It only occurs inside the prop section of the class.
import * as moment from 'moment';
import { Vue, Component, Watch, Prop } from 'vue-property-decorator';
@Component({
name: 'TestMoment',
props: {
tomorrow: moment.Moment,
}
})
export default class TestMoment extends Vue {
private date: moment.Moment = moment();
public created() {
console.log(this.date);
}
}
The specific error is on the tomorrow property and I get:
Property 'Moment' does not exist on type 'typeof moment'. Did you mean 'isMoment'?
I have an editor which highlights errors and mousing over the moment on the line with tomorrow indicates the error, but not on the line private date...