Closed ishaq closed 4 years ago
We separate types from src, you need to set up aliases in your tsconfig.json iirc. Your question should be directed to a TypeScript forum.
That said, you should not be accessing internal items as they can break without warning. Be careful.
path mapping will help
https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
Set one key of the paths object to
bitcoinjs-lib/src/bufferutils
and the value to an array with one string
bitcoinjs-lib/types/bufferutils
Pardon the newbie question. My code, typescript, is:
this compiles fine but when I run it (using node). it throws:
Is
BufferWriter
not supposed to be used outside of bitcoinjs-lib? or is something wrong in my code? Thank you.