Options governing how resolveShortcodeKey handles a collision or a missing shortcode.

interface ResolveShortcodeOptions {
    dedupe: boolean;
    isDuplicate?: boolean;
    makeRandomId?: () => string;
}

Properties

dedupe: boolean

When true, the caller opts into automatic deduplication: a colliding shortcode is suffixed (arrowarrow2) until unique, and a create with neither a shortcode nor a usable name gets a random 16-char id — so the resolve can never fail. When false/absent, a collision (or a name-less create) is rejected.

isDuplicate?: boolean

Whether this create is an explicit Foundry duplicate (_stats.duplicateSource). A duplicate always carries the source shortcode, so a collision is expected and auto-suffixed even without dedupe.

makeRandomId?: () => string

Generates a fresh id in the Foundry-id charset ([A-Za-z0-9]), used only for the "no shortcode and no usable name, dedupe on" corner. Injected by the Foundry-layer caller (the fvttRandomId shim) so this resolver stays Foundry-free and unit-testable; required to reach that branch.