TS2345: Argument of type 'string' is not assignable to parameter of type
MaxNvk opened this issue · 3 comments
MaxNvk commented
Hi there! I have bug with types when i'm try to use $dayjs inside of vuex mutations (example in photo below). when i'm assign value directly, without using of $dayjs module, error dissapears.
my tsconfig.json file includes:
{
"compilerOptions": {
"target": "ES2018",
"module": "ESNext",
"moduleResolution": "Node",
"lib": ["ESNext", "ESNext.AsyncIterable", "DOM", "DOM.Iterable"],
"resolveJsonModule": true,
"esModuleInterop": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"jsx": "preserve",
"noEmit": true,
"declaration": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
"@/*": ["./*"]
},
"types": ["@nuxt/types", "@nuxtjs/dayjs", "@nuxtjs/auth-next", "@nuxtjs/axios", "@types/node", "nuxt-i18n", "@nuxt/image"]
},
"exclude": ["node_modules", ".nuxt", "dist", "stories"]
}
Have any ideas why it occurs?
potato4d commented
thank you.
Cloud you share the detailed source code with the codesandbox URL?