atom-ternjs
atom-ternjs copied to clipboard
LoadEagerly doesn't work as expected
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?
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.
- wait.
- Remove
.atom/packages/atom-ternjs, then clone this repo (last commit) into.atom/packages/atom-ternjs, thenapm installand restart atom.
Greetings