pub async fn create_type_graph(
    roots: Vec<ModuleSpecifier>,
    is_dynamic: bool,
    maybe_imports: Option<Vec<(ModuleSpecifier, Vec<String>)>>,
    loader: &mut dyn Loader,
    maybe_resolver: Option<&dyn Resolver>,
    maybe_locker: Option<Rc<RefCell<Box<dyn Locker>>>>,
    maybe_parser: Option<&dyn SourceParser>,
    maybe_reporter: Option<&dyn Reporter>
) -> ModuleGraph
Expand description

Create a module graph, including only dependencies that might affect the types of the graph, skipping any “code only” imports. This is useful in situations where only the types are being used, like when type checking code or generating documentation.

Note that code which is overloaded with types upon access (like the X-TypeScript-Types header or types defined in the code itself) will still be loaded into the graph, but further code only dependencies will not be followed.