Object methods treated as properties (not functions)

I read that this behaviour has not changed in a while. I would just like yo know what can I do to solve the following situation.

I have a group of functions organised as modules, each one in its own separated file.

All this functions are imported into another file like:

 

import {functionA} from './internals/function-a.js';

import {functionB} from './internals/function-b.js';

import {functionC} from './internals/function-c.js';

 

And added to an object like:

 

const MyObject = {

    functionA,

    functionB,

    functionC

}

 

And finally exported like:

 

export {MyObject};

 

Wherever I import that object, to use my collection of carefully documented functions, WebStorm treats MyObject.functionA as a property and not as a function (purple coloured instead of yellow). Loosing auto-completion, types checks, etc.

Why is this happening? And why has not been fixed? How can I solve this at least temporarily? 

 

Thank you very much!

0

Please sign in to leave a comment.