I’m fairly new to TypeScript and I’m running into an issue. I have a .ts
I’m using to store some helper functions. These functions are called via .call
so the proper this
is referenced. In that file, each this gives the following two errors:
'this' implicitly has type 'any' because it does not have a type annotation.
An outer value of 'this' is shadowed by this container.
An example of one of the helpers:
export function setEditId(id: string) {
this.editTodoId = id;
}
Here’s the repo (it’s small): https://github.com/colebillys19/vue-todo-typescript The file in question is App.helpers.ts
.
For additional context, I got the project up and running without TypeScript and everything works fine. That repo is here if you’re interested: https://github.com/colebillys19/vue-todo