// Compiled, never run: an ES module TypeScript consumer. The "import" condition in "exports" gives it the // declarations next to the ES module build (dist/esm/*.d.ts), which has named exports only. Read through the // CommonJS declarations in dist/types, the default import below compiles and then fails when Node loads it. import { Alex2MQTT, DEFAULT_HOST, EndpointHealth } from "alex2node"; import type { Device } from "alex2node"; // @ts-expect-error the ES module build has no default export import alex2node from "alex2node"; const bridge = new Alex2MQTT("user", "password", "root", false, { host: DEFAULT_HOST }); const devices: Device[] = bridge.getDevices(); const health: EndpointHealth = EndpointHealth.OK; export { devices, health };