API Reference

The full TypeScript API reference is automatically generated from the JSDoc annotations embedded in the src/ source files using deno doc --html.

Browsing the reference

Tip: The API reference is a separate static site generated alongside this book. Click the button below (or the sidebar link) to open it.

Note: The api-reference/index.html link above is only available after running deno task docs:api (to generate just the API reference) or deno task docs:build (to build the full site) locally or in a deployed mdBook site. It is not present in the repository source tree.

What is documented

Every symbol exported from the library's main entry point (src/index.ts) is covered, including:

CategoryKey exports
CompilerFilterCompiler, SourceCompiler, IncrementalCompiler, compile()
TransformationsRemoveCommentsTransformation, DeduplicateTransformation, CompressTransformation, ValidateTransformation, …
PlatformWorkerCompiler, HttpFetcher, CompositeFetcher, PlatformDownloader
FormattersAdblockFormatter, HostsFormatter, DnsmasqFormatter, JsonFormatter, …
ServicesFilterService, ASTViewerService, AnalyticsService
DiagnosticsDiagnosticsCollector, createTracingContext, traceAsync, traceSync
UtilsRuleUtils, Logger, CircuitBreaker, CompilerEventEmitter, …
ConfigurationConfigurationSchema, ConfigurationValidator, all Zod schemas
TypesAll public interfaces (IConfiguration, ILogger, ICompilerEvents, …)
DiffDiffGenerator, generateDiff
PluginsPluginRegistry, PluginTransformationWrapper

Regenerating locally

# Generate the HTML API reference into book/api-reference/
deno task docs:api

# Build the full mdBook site + API reference in one step
deno task docs:build

# Live-preview the mdBook (does not include API reference)
deno task docs:serve

JSDoc conventions

All public classes, interfaces, methods, and enum values are documented with JSDoc comments following the project's conventions:

/**
 * Brief one-line description.
 *
 * Longer explanation of behaviour, constraints, or design decisions.
 *
 * @param inputRules - The raw rule strings to process.
 * @returns The transformed rule strings.
 * @example
 * ```ts
 * const result = new DeduplicateTransformation().executeSync(rules);
 * ```
 */

See docs/development/CODE_REVIEW.md for the full documentation style guide.