In my typescript vue application, I encountered an error within a component while trying to access a parameter passed into the route. Here is the relevant code snippet:
properties = getModule(PropertiesModule, this.$store);
mounted() {
id = this.$router.history.current.params.id;
this.properties.getProperty(id);
}
get months() {
return this.$store.state.app.months;
}
get property() {
return this.$store.state.properties.property;
}
Despite my best efforts, the code runs without issue and appears to be correct from what I can tell. However, TypeScript continues to throw errors. I attempted using `es-lint disable-next-line` and assigning the router type in my main.ts file as any, but neither solution resolved the issue. Is there a better or alternative way to access router parameters in vue.js?