timotejroiko / net-ipc

A simple node.js IPC client-server with no dependencies
MIT License
29 stars 6 forks source link

ClientStatus enum problems #6

Closed pioupia closed 1 year ago

pioupia commented 1 year ago

We can access to the ClientStatus value from TypeScript because of the type. But, after the compile with TSC, an error appears:

if (this.client.status === net_ipc_1.ClientStatus.READY)

TypeError: Cannot read properties of undefined (reading 'READY')

because the ClientStatus values were never export.

timotejroiko commented 1 year ago

changed it to const enum, check if it works now npm i timotejroiko/net-ipc

pioupia commented 1 year ago

changed it to const enum, check if it works now npm i timotejroiko/net-ipc

Yeah, thats work fine, thank you!