I am working with the following code snippet:
computed: {
todos(): Todo[] {
return this.$store.getters['todos/list']
}
}
However, I would prefer to have it look like this:
computed: {
todos: (): Todo[] => this.$store.getters['todos/list']
}
Unfortunately, I am encountering an error which is shown in the following images:
https://i.sstatic.net/8BUB4.png
https://i.sstatic.net/uOeaa.png
Does anyone know how I can adjust this code so that the computed property returns on the same line? Any help or suggestions would be greatly appreciated.
Thank you for your assistance.