JavaScriptEnhancements
JavaScriptEnhancements copied to clipboard
Recognize `exports` with autocomplete
I have a module defined inside of this initialization code (I copied it from somewhere else and don't fully understand it). Inside of it, the plugin recognizes exports as type Any, but how can I get it to recognize as object? For example, I want to be able to have a suggestion for XYZMethod, but there are currently no suggestions after typing exports..
function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.XYZModule = global.XYZModule || {})));
}(this, (function (exports) { 'use strict';
exports.XYZMethod = function (x) {
return x;
};
Object.defineProperty(exports, '__esModule', { value: true });
})));