typescript-mix icon indicating copy to clipboard operation
typescript-mix copied to clipboard

This expression is not callable.

Open tom-dr opened this issue 5 years ago • 2 comments

ERROR in D:/git/aca-stages/src/components/InternshipsSchedule.vue(994,4):
994:4 This expression is not callable.
  Type 'typeof import("D:/git/aca-stages/node_modules/typescript-mix/dist/index")' has no call signatures.
    992 | })
    993 | export default class InternshipsSchedule extends Vue {
  > 994 |   @use( stepsMixin ) (this as any)
        |    ^
    995 | 
    996 |   dataLevelsIsLoading = false
    997 | 
Version: typescript 3.9.7
Time: 780ms

tom-dr avatar Nov 13 '20 09:11 tom-dr

I'm getting the same thing, I have a feeling it's because I'm not importing decorators correctly because I'm using create-react-app and there might be an extra step.

ktstowell avatar Nov 13 '20 20:11 ktstowell

So i just dug through the code and it shows exports.use = use; - meaning you will have to import {use} from 'typescript-mix though the documentation doesn't show the named import and treats it as a default.

ktstowell avatar Nov 13 '20 22:11 ktstowell