JamesBroadberry / deno-bcrypt

A port of jBCrypt to TypeScript for use as a Deno module
ISC License
67 stars 5 forks source link

Error just importing #16

Closed jrdx0 closed 3 years ago

jrdx0 commented 3 years ago

I just import the module and it throw me this error:

error: TS2345 [ERROR]: Argument of type '{ type: "module"; deno: boolean; }' is not assignable to parameter of type 'WorkerOptions'.
  Object literal may only specify known properties, and 'deno' does not exist in type 'WorkerOptions'.
    { type: "module", deno: true },
JamesBroadberry commented 3 years ago

Have you used the --allow-net and --unstable flags when running your application?

jrdx0 commented 3 years ago

Thanks for respond! Yeah, that was my error. I didn't want to use --unstable flag so I thought that was an issue of old deno versions. Let me delete my pull request. Thanks again!

JamesBroadberry commented 3 years ago

No problem. Yeah, it's something that you need to unfortunately do (still!) when using the crypto module in WebWorkers, which this module requires to run async. Glad it's all sorted 👍