You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to enable strict typing for js files, since all files in my project are written in js. But this causes strict typing to get enabled for all other files as well, including imported libraries. For example:
doesn't have any type errors, but https://deno.land/[email protected]/hash/_wasm/wasm.js does, and so a whole bunch of errors are emitted and the file is not run.
The only solution to this that I'm aware of it to disable allowJs and put //@ts-check at the top of the file. But I'd really rather not have to do that for every file across my project, it's prone to errors and just overall pretty tedious.
I realise this is a bit of a weird request, this seems more like a TypeScript issue than a Deno issue. The difference is, if I import a .js library in TypeScript, I can at least fix the issue by adding @ts-nocheck to that library. In Deno I don't have any control over the contents of external files.
One related TypeScript issue mentions being able to provide a list of paths where all errors are suppressed, so perhaps this is something that should be fixed in TypeScript rather than Deno. But even then it would still have to support suppressing urls somehow.
The text was updated successfully, but these errors were encountered:
I'd like to enable strict typing for js files, since all files in my project are written in js. But this causes strict typing to get enabled for all other files as well, including imported libraries. For example:
With the following deno.json:
doesn't have any type errors, but
https://deno.land/[email protected]/hash/_wasm/wasm.js
does, and so a whole bunch of errors are emitted and the file is not run.The only solution to this that I'm aware of it to disable allowJs and put
//@ts-check
at the top of the file. But I'd really rather not have to do that for every file across my project, it's prone to errors and just overall pretty tedious.I realise this is a bit of a weird request, this seems more like a TypeScript issue than a Deno issue. The difference is, if I import a .js library in TypeScript, I can at least fix the issue by adding
@ts-nocheck
to that library. In Deno I don't have any control over the contents of external files.One related TypeScript issue mentions being able to provide a list of paths where all errors are suppressed, so perhaps this is something that should be fixed in TypeScript rather than Deno. But even then it would still have to support suppressing urls somehow.
The text was updated successfully, but these errors were encountered: