atom-ternjs icon indicating copy to clipboard operation
atom-ternjs copied to clipboard

LoadEagerly doesn't work as expected

Open TitanNano opened this issue 10 years ago • 1 comments

I configured my project like this:

{
    "ecmaVersion": 6,
    "libs": [
        "browser"
    ],
    "loadEagerly": [
        "src/**/*.js"
    ],
    "dontLoad": [
        "src/**/npm_modules/**/*.js"
    ],
    "plugins": {
        "modules": {},
        "es_modules": {},
        "doc_comment": {}
    }
}

So I expected all files to be loaded expect the node modules. I have scripts like this:

import { Make } from './make.js';
import { ConfigLoader } from './ConfigLoader.js'

let Config = {
[...]
}

export default Config;
import Config from '../modules/Config.js';
[...]
let ResponseHandler = {
[...]
    Config.get(...)
}

But when I type Config, I get it suggested wtih the type shown as ?. So when I want to access a property of the object I don't get any proper suggestions, just the normal guesses...

How is this intended to work? Can I see somewhere which files are loaded in TernJS?

TitanNano avatar Dec 02 '15 15:12 TitanNano

Sure thing. I added a menu item to show all files analyzed by Tern. They will be logged in the console. Since this won't be available since the next release, you have two options.

  1. wait.
  2. Remove .atom/packages/atom-ternjs, then clone this repo (last commit) into .atom/packages/atom-ternjs, then apm install and restart atom.

Greetings

tststs avatar Dec 11 '15 13:12 tststs