Hi, the docs start with saying that CommonJS version is rooted at "./cjs/nats.js", however, that cannot be imported directly from TypeScript, as there are no typings.
For CommonJS + TypeScript, the only import I got to work was:
import {connect, NatsConnection} from "nats.ws/lib/src/mod.js";
Is that the correct way?
Plus obviously it would be good to fix the basics -- use a more standard package layout that is easy and obvious to import, and document clearly how to import for modern stuff for those who still fail at the easy and obvious (currently the "importing the module" section of the docs only talks about using a Githubissues.
Githubissues is a development platform for aggregating issues.
Hi, the docs start with saying that CommonJS version is rooted at "./cjs/nats.js", however, that cannot be imported directly from TypeScript, as there are no typings.
For CommonJS + TypeScript, the only import I got to work was:
import {connect, NatsConnection} from "nats.ws/lib/src/mod.js";
Is that the correct way?
Plus obviously it would be good to fix the basics -- use a more standard package layout that is easy and obvious to import, and document clearly how to import for modern stuff for those who still fail at the easy and obvious (currently the "importing the module" section of the docs only talks about using a Githubissues.