Fork me on GitHub
#cursive
<
2019-01-11
>
thosmos15:01:36

I'm doing something like (ns my.ns (:require "firebase/auth" :as fb-auth)) using an NPM dep via shadow-cljs and Cursive is marking it as unresolved. Is there any way to provide Cursive with a stub or externs so that it will recognize the various fn names in the namespace?

thosmos15:01:09

I suppose I'm looking for something similar to how it handles java imports.

thosmos15:01:37

The npm does include externs like

* @namespace
 * @param {!=} app
 *
 * @return {!firebase.auth.Auth}
 */
firebase.auth = function(app) {};

/**
 * Interface that represents the credentials returned by an auth provider.
 * Implementations specify the details about each auth provider's credential
 * requirements.
 *
 * @interface
 */
firebase.auth.AuthCredential = function() {};
It would be amazing if that externs could be analyzed to provide introspection. Is there anything I can do to convert this into some CLJ or CLJS thing that Cursive would understand?

cfleming20:01:28

@thosmos No, but I do have plans to re-vamp the CLJS support soon which will do this.

mike_ananev21:01:43

@cfleming Hi. In our corporate network we can't install clojure deps cli tools on our windows machines. Is it possible to use clj deps cli tools via Cursive? May be Cursive can understand deps.edn files without installed clj cli tools? We use deps.edn to build project via various plugins. Or Cursive depends on clj deps cli tools?

mike_ananev21:01:36

Our problem: corporate windows policies prohibits using WSL. so, half of our team, with BYOD devices, using clj cli tools, and another half with corporate PCs (Windows OS only) should use leiningen, which is available for Windows and allowed in our network . it is very inconvenient. we are still waiting for the windows version of Clj cli tools.