- It looks like the
.ws namespace in the client is present in runtime/javascript, however, it is completely missing in d.ts files. So, generally, websocket APIs are unusable from typescript, without dirty hacks.
package.json lacks type: "module" or any other definition
- Also, it looks like many types exist in
.d.ts files, and are essentially not usable in typescript source code (see sample below)
// assume following import
import { OrderSide } from "binance-api-node";
// then use it
const orderSide = OrderSide.BUY;
In this sample, when TS is compiled to JS, the OrderSide won't exist in JS context and import will fail, because initially OrderSide comes from .d.ts file, which does not get to compiled JS output.
.wsnamespace in the client is present in runtime/javascript, however, it is completely missing ind.tsfiles. So, generally, websocket APIs are unusable from typescript, without dirty hacks.package.jsonlackstype: "module"or any other definition.d.tsfiles, and are essentially not usable in typescript source code (see sample below)In this sample, when TS is compiled to JS, the OrderSide won't exist in JS context and import will fail, because initially OrderSide comes from
.d.tsfile, which does not get to compiled JS output.