-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
I have third party dependencies that work with the default --no-check=remote option. However once I vendor them and updating deno.json to use the vendor/import_map.json, I start getting errors type errors. It appears the only workaround for having my dependencies vendored is to run deno run and deno test with the --no-check flag to disable all checking. I'd like to have checking for my other local files when I run deno test. According to the most recent release blog post, it looks like it's planned to keep local type checking for deno test and to remove it for deno run.
In our deno.json file we can configure deno lint and deno fmt to exclude files and directories. It would be nice if we could do the same with deno's type checking so that we can disable it for the vendor directory generated by deno vendor. That would allow me to use deno vendor without giving up type checking when I run my tests.
Below is an example of one of the type errors I get related to my vendored dependencies. I don't get the type error when not using vendored dependencies.
error: TS2339 [ERROR]: Property 'spawn' does not exist on type 'typeof Deno'. 'Deno.spawn' is an unstable API. Did you forget to run with the '--unstable' flag?
const { status, stderr } = await Deno.spawn(Deno.execPath(), {
~~~~~
at file:///home/kyle/Projects/deno/udibo/vendor/deno.land/std@0.141.0/node/_utils.ts:228:41