import { type graph } from "https://deno.land/x/cav@0.2.3/deps.ts";
const { ParseModuleOptions } = graph;
Properties
For remote resources, a record of headers should be set, where the key's have been normalized to be lower case values.
When identifying a @jsxImportSource
pragma, what module name will be
appended to the import source. This defaults to jsx-runtime
.
The kind of module to set on the resulting parsed module.
Methods
An optional callback that allows the default resolution logic of the module graph to be "overridden". This is intended to allow items like an import map to be used with the module graph. The callback takes the string of the module specifier from the referrer and the string URL of the referrer. The callback then returns a fully qualified resolved URL string specifier or an object which contains the URL string and the module kind. If just the string is returned, the module kind is inferred to be ESM.
An optional callback that can allow custom logic of how type dependencies
of a module to be provided. This will be called if a module is being added
to the graph that is is non-typed source code (e.g. JavaScript/JSX) and
allow resolution of a type only dependency for the module (e.g. @types
or a .d.ts
file).