In my code snippet, I am trying to set a new value for this.msg
but it results in an error saying
Type '"asdasd"' is not assignable to type 'Function'
. This issue persists both in Visual Studio and during webpack build. It seems like TypeScript is not recognizing the type correctly even though I am using Vue.extend
. What could be causing this problem?
This is my tsconfig.json
configuration:
{
"compilerOptions": {
"outDir": "./built/",
"sourceMap": true,
"strict": true,
"noImplicitReturns": true,
"module": "es2015",
"moduleResolution": "node",
"target": "es5",
"allowSyntheticDefaultImports": true,
},
"include": [
"./ViewModels/**/*"
]
}
I have also removed all references to TypeScript from my .csproj
file because Visual Studio was having trouble building TypeScript (and since I use webpack for building, I decided to exclude TypeScript from the project).
You can find my webpack config here: https://gist.github.com/archeg/743348021c59563a9d479993bc0c349f