Skip to main content
Module

x/deno_doc/mod.ts>DocOptions

Documentation generator for Deno
Go to Latest
interface DocOptions
import { type DocOptions } from "https://deno.land/x/deno_doc@0.68.0/mod.ts";

Properties

optional
importMap: string

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.

optional
printImportMapDiagnostics: boolean = true

Print import map diagnostics.

optional
includeAll: boolean

If true include all documentation nodes in the output, included private (non-exported) nodes. The default is false. Use the declarationKind of the DocNode to determine if the doc node is private, exported, imported, or declared.

Methods

optional
load(
specifier: string,
isDynamic?: boolean,
cacheSetting?: CacheSetting,
): Promise<LoadResponse | undefined>

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.

optional
resolve(specifier: string, referrer: string): string

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.