hash-wasm icon indicating copy to clipboard operation
hash-wasm copied to clipboard

Consider adding WASMInterface to the list of exports in lib/index.ts so I can reference IHasher from client code

Open alasdaircs opened this issue 8 months ago • 1 comments

I want to declare a variable of type IHasher in my TypeScript code, but it's declared in WASMInterface.ts and although that builds to /dist/lib/WASMInterface.d.ts, it's not exported in /lib/index.ts so I can't write:

import { IHasher } from 'hash-wasm';

If I attempt to reference it directly with import { IHasher } from 'hash-wasm/dist/lib/WASMInterface' I get compiler errors from my WebPack build.

Please consider adding:

export * from './WASMInterface';

to lib/index.ts

alasdaircs avatar Jun 17 '24 14:06 alasdaircs