Fork me on GitHub

i was just helped by: -- for some reason, vscode.Position is not handled by inference (though vscode.Range is), i guess. would reporting this somewhere possibly help to improve the current inferencing?


how did you use it in code?


hi all, when i navigate to my dev server in chrome, I get a bunch of ERR_INSUFFICIENT_RESOURCES--it seems like too many requests for individual .js files are going out and chrome is choking. it works fine in firefox though. has anyone run into this issue before? i haven't even written much code in this project yet, so i'm not sure what to try


(fwiw it looks like the .js file count is so high because i have material-ui as a dep, though of course i'd like to avoid the solution "stop using material-ui" 😬)


@thheller i used it like this:

(defn position
  [r c]
  (vscode.Position. r c))

(defn range
  ([p1 p2]
   (vscode.Range. p1 p2))
  ([r1 c1 r2 c2]
    (position r1 c1)
    (position r2 c2))))
where above there was (def vscode (js/require "vscode"))


yeah thats not a supported construct for externs inference


you should use the proper (:require ["vscode" :as vscode]) and then vscore/Range


that seems to work 🙂