import { type DocOptions } from "https://deno.land/x/deno_doc@0.86.0/mod.ts";
Properties
An optional URL string which provides a location of an import map to be loaded and used to resolve module specifiers. This should be an absolute value.
When a resolve()
function is also specified, a warning will be issued
and the import map will be used instead of the resolve()
function.
Methods
An optional callback that is called with the URL string of the resource to
be loaded and a flag indicating if the module was required dynamically. The
callback should resolve with a LoadResponse
or undefined
if the module
is not found. If there are other errors encountered, a rejected promise
should be returned.
This defaults to a load function which will use fetch()
and
Deno.readFile()
to load modules, and requires the appropriate permissions
to function. If the permissions are note available at startup, the default
function will prompt for them.
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 resolved URL string specifier.
When an importMap
URL string and this method is specifier, a warning
will be issued and the import map will be used.