Categories
interface ImportMapDocument

A deterministic Deno import map generated from package import entries, following the Import Maps Standard.

Examples

Example 1

import type { ImportMapDocument } from 'jsr:@kjanat/importmapify';

const doc: ImportMapDocument = {
  imports: { '#lib/bytes': './src/lib/bytes.ts' },
  scopes: { './tests/': { '#lib/bytes': './tests/stub/bytes.ts' } },
};

Properties

readonly
imports: Readonly<Record<string, string>>

Exact specifier-to-target mappings, sorted by specifier, as in Deno's custom path mappings.

readonly
optional
scopes: Readonly<Record<string, Readonly<Record<string, string>>>>

Scope prefixes mapped to sorted, scope-specific import overrides, as in Deno's scoped mappings.