Hello! When I include files in my client JS, and then try to use variables from them (e.g.
Vue() for Vue.js, or
moment for Moment.js), the editor marks them with a syntax error, because the editor doesn’t think they’re defined, because it can’t see the includes.
I realize trying to look inside all the includes would be prohibitive, but does anyone have a way to trick the editor into thinking they’re defined? I’ve tried things like
let Vue = Vue and trickier variants, which fixes the syntax, but causes ReferenceErrors when the script is run.
What might be nice is, say, a special kind of comment (a la Vim modelines) that would list variables the editor should assume are defined elsewhere, but I’m not sure if that would be practical to work into the syntax highlighting.