← Back to context

Comment by skybrian

1 day ago

Deno resolves import statements in its own way. For example, you can import URLs and JSR packages directly, but the file is usually loaded from Deno’s global module cache. To resolve imports you need to look at the deno.json file and deno.lock file. They also added Deno Workspaces (monorepos) which adds more complexity.

This means you need to plug an import resolver to the TypeScript compiler. Deno uses the TypeScript compiler API, but all the import resolution code is in Rust. I’ve done a partial reimplementation in TypeScript using a coding agent, but there’s quite a lot to it.

I don’t think Deno will be able to upgrade until the TypeScript compiler API is ready.

Thanks for the reply. I don't understand what a TypeScript version bump has to do with import statements, though.

  • If you can’t resolve imports to source files then no static analysis tools will work. So, it has to be plugged into the compiler somehow.