Open herrdu opened 5 years ago
Translation of this issue:
2.12.0
Macos/chrome
2.6.10
Https://github.com/iwata/codesandbox-nuxt
Git clone git@github.com: iwata/codesandbox-nuxt.git
Yarn install $yarn dev
No error reporting
ERROR in/Users/iwata/.go/src/github.com/iwata/codesandbox-nuxt/node_modules/@nuxt/vue-app/types/index.d.ts(73,18):
TS2430: Interface'NuxtApp'incorrectly extends interface'Vue'. Types of property'$loading'are incompatible.
Property'open'is missing in type'NuxtLoading' but required in type'{open: (params: Loading Config) => {close: () => any;};}'.
I got this problem too.
0:18 Interface 'NuxtApp' incorrectly extends interface 'Vue'.
Types of property '$loading' are incompatible.
Type 'NuxtLoading' is not assignable to type '(options: LoadingServiceOptions) => ElLoadingComponent'.
Type 'NuxtLoading' provides no match for the signature '(options: LoadingServiceOptions): ElLoadingComponent'.
88 | }
89 |
> 90 | export interface NuxtApp extends Vue {
| ^
91 | $options: NuxtAppOptions
92 | $loading: NuxtLoading
93 | context: Context
I also have this problem
I also have this problem
solved ?
:+1:
我也有这个问题
解决了 ? Do the following
tsconfig.json
compilerOptions :{"skipLibCheck": true}
I also have the problem when i using typescript. solved ?
I have this configuration in my tsconfig.json and it works fine for the moment
{
"compilerOptions": {
"target": "es2018",
"module": "esnext",
"moduleResolution": "node",
"lib": [
"esnext",
"esnext.asynciterable",
"dom"
],
"esModuleInterop": true,
"experimentalDecorators": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"skipLibCheck": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"~/*": [
"./*"
],
"@/*": [
"./*"
]
},
"types": [
"@types/node",
"@nuxt/types"
]
},
"exclude": [
"node_modules"
]
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please don’t close this issue
Element UI version
2.12.0
OS/Browsers version
macos/chrome
Vue version
2.6.10
Reproduction Link
https://github.com/iwata/codesandbox-nuxt
Steps to reproduce
$ git clone git@github.com:iwata/codesandbox-nuxt.git $ yarn install $ yarn dev
What is Expected?
不报错
What is actually happening?
ERROR in /Users/iwata/.go/src/github.com/iwata/codesandbox-nuxt/node_modules/@nuxt/vue-app/types/index.d.ts(73,18): TS2430: Interface 'NuxtApp' incorrectly extends interface 'Vue'. Types of property '$loading' are incompatible. Property 'open' is missing in type 'NuxtLoading' but required in type '{ open: (params: LoadingConfig) => { close: () => any; }; }'.