RadarTech / lnrpc

A Typescript gRPC client for LND with support for all LND sub-servers
MIT License
43 stars 13 forks source link

TypeError: lnrpc_1.default is not a function #18

Closed mitchelljustin closed 5 years ago

mitchelljustin commented 5 years ago

import createLnRpc from "@radar/lnrpc" doesn't seem to work. createLnRpc isn't a function.

Platform: darwin_x64 Node: v11.10.1 @radar/lnrpc version: 0.5.2-beta

cavanmflynn commented 5 years ago

Thanks for opening an issue!

It seems that our typings are using export default, rather than export, which prevents Typescript from displaying the correct error message and breaks as * imports. I'll push a fix ASAP to address this issue. Regardless, you must set "esModuleInterop": true in your tsconfig.json if you would like to use a default export.

mitchelljustin commented 5 years ago

Ah excellent, that works. Thanks!

cavanmflynn commented 5 years ago

The typings have been fixed in release 0.5.2-beta.0.