vuejs / composition-api

Composition API plugin for Vue 2
https://composition-api.vuejs.org/
MIT License
4.19k stars 343 forks source link

Type '{ install: (Vue: VueConstructor<Vue>) => void; }' has no call signatures #950

Closed MartinX3 closed 2 years ago

MartinX3 commented 2 years ago

Using IntelliJ IDEA, vue 2.6.14, vuetify 2.6.7 and typescript 4.7.4 every export default defineComponent({ throws the error:

TS2349: This expression is not callable.   Type '{ install: (Vue: VueConstructor<Vue>) => void; }' has no call signatures.
export default const Plugin: {install: (Vue: VueConstructor) => void}
@vue/composition-api
antfu commented 2 years ago

We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required

MartinX3 commented 2 years ago

@antfu please reopen v2.zip

> vue-tsc --noEmit && vite build

src/App.vue:4:16 - error TS2349: This expression is not callable.
  Type '{ install: (Vue: VueConstructor<Vue>) => void; }' has no call signatures.

4 export default defineComponent({
                 ~~~~~~~~~~~~~~~

Found 1 error in src/App.vue:4

image

antfu commented 2 years ago

{ defineComponent }

MartinX3 commented 2 years ago

Please shoot me. IntelliJ bullied me with its automatic generated import. Thank you.