Modules

Structs

An implementation of SourceParser that stores the parsed ASTs.

The default implementation of SourceParser used by this crate.

Provides a way for imports, through configuration, to be imported to the module graph without requiring the dependencies to be analyzed. This is intended to be used for importing type dependencies or other externally defined dependencies, like JSX runtimes.

The structure which represents a module graph, which can be serialized as well as “printed”. The roots of the graph represent the “starting” point which can be located in the module “slots” in the graph. The graph also contains any redirects where the requested module specifier was redirected to another module specifier when being loaded.

Enums

Traits

Parses text to a ParsedSource.

Functions

Searches comments for any @deno-types compiler hints.

Gets all the dependencies of this module.

Searches comments for any triple slash references.

Create a module graph, including only dependencies of the roots that would contain code that would be executed, skipping any type only dependencies. This is useful when wanting to build a graph of code for loading in runtime that doesn’t care about type only dependencies.

Create a module graph, based on loading and recursively analyzing the dependencies of the module, returning the resulting graph.

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.

Parse an individual module, returning the module as a result, otherwise erroring with a module graph error.

Parse an individual module from an AST, returning the module.

Given a specifier string and a referring module specifier, try to resolve the target module specifier, erroring if it cannot be resolved.

Type Definitions