-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Currently the graph cannot represent multiple locations an import specifier might be imported in a file. For example, an import can be like this:
import * as a from "https://example.com/a";
import { default as b } from "https://example.com/a";In addition, in theory, a module can be statically and dynamically imported:
import * as a from "https://example.com/a";
const b = await import("https://example.com/a";Or in TypeScript the same specifier can be provided for a type only import:
import { a } from "https://example.com/a";
import type { A } from "https://example.com/a";Currently we only store the last range for the specifier in the graph. This makes it difficult when trying to rewrite specifiers (like in dnt or deno vendor) as well as means that diagnostics are only issued for the "last" import location, not all import locations for a given specifier.
We should enhance the graph to be able to store this information, which is likely going to be a breaking change, but one that increases the usability of the graph.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request