pichillilorenzo / JavaScriptEnhancements

JavaScript Enhancements is a plugin for Sublime Text 3. It offers not only a smart javascript autocomplete but also a lot of features about creating, developing and managing javascript projects (real-time errors, code refactoring, etc.).
MIT License
638 stars 41 forks source link

Recognize `exports` with autocomplete #68

Open rosano opened 5 years ago

rosano commented 5 years ago

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 });

})));