kevlened / isomorphic-webcrypto

:game_die: webcrypto library for Node, React Native and IE11+
https://www.w3.org/TR/WebCryptoAPI/
MIT License
116 stars 43 forks source link

An export assignment cannot be used in a module with other exported elements. #68

Closed piijt closed 2 years ago

piijt commented 2 years ago

There is a dual export in index.d.ts where if the first one is removed build steps will work for this in ts, but if it is there you can't build in ts with this library

piijt commented 2 years ago

For anyone else trying to use this module and getting the same error in a nodejs ts enviroment, i ended up using the native crypto implementation and declaring it like so:

declare module "crypto" {
    namespace webcrypto {
      const subtle: SubtleCrypto;
    }
  }

closing issue again.