interface PrintOpts

Side-effect injection points for maybePrint — testing seams.

import type * as Hint from './hint.ts';

const lines: string[] = [];
const opts: Hint.PrintOpts = { sentinelPath: '/tmp/qunitx-hint-shown', write: (t) => lines.push(t) };
opts.sentinelPath; // '/tmp/qunitx-hint-shown'

Properties

optional
sentinelPath: string

Sentinel-file path (defaults to ~/.cache/qunitx/hint-shown).

optional
write: (text: string) => void

Writer function (defaults to process.stderr.write).

Usage

import { type PrintOpts } from "lib/commands/daemon/hint.ts";