Deno: Using both unstable and --no-check at same time

Created on 19 Sep 2020  路  1Comment  路  Source: denoland/deno

hey i'm using deno v1.4.1 , as from now onwards deno has enabled strict type checking in all typescript file, i am also using deno_mongo third party module which requires file to run with --unstable flag , also --unstable flag causes strict type checking which causes TS1371 (import / export error) , as far as i know , with --no-check we can disable type checking so the runtime script looks like deno run -A --unstable --no-check app.ts but it throws error like

error: Uncaught SyntaxError: Invalid left-hand side in assignment
      this.pushQueue.push(event);
~~~~~~~~~~~~~~~~~~~~~~~~
    at <https://deno.land/x/[email protected]/graphql-subscriptions/pubsub-async-iterator.ts>:81:1 

and further if i write like : deno run -A --unstable app.ts it gives TS1371 error

question

Most helpful comment

The code you are using isn't "safe" under --no-check. We added those checks by default to Deno 1.4 to help make the transition easier. If it throws a TS1371 error under --unstable it is a clear indication that the code won't work properly under --no-check, which in this case appears to be true.

If you want to use --no-check, all of your dependencies need to be "no check" safe. I would encourage you to raise issues with your dependencies to get the code updated.

If you want to "disable" the check introduced in 1.4, you can also supply a tsconfig using the --config with something like this:

{
  "compilerOptions": {
    "isolatedModules": false
  }
}

>All comments

The code you are using isn't "safe" under --no-check. We added those checks by default to Deno 1.4 to help make the transition easier. If it throws a TS1371 error under --unstable it is a clear indication that the code won't work properly under --no-check, which in this case appears to be true.

If you want to use --no-check, all of your dependencies need to be "no check" safe. I would encourage you to raise issues with your dependencies to get the code updated.

If you want to "disable" the check introduced in 1.4, you can also supply a tsconfig using the --config with something like this:

{
  "compilerOptions": {
    "isolatedModules": false
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ry picture ry  路  3Comments

motss picture motss  路  3Comments

watilde picture watilde  路  3Comments

metakeule picture metakeule  路  3Comments

ry picture ry  路  3Comments