function maybePrint
maybePrint(): Promise<void>

Prints the daemon-mode tip to stderr and creates a sentinel file so the tip is shown at most once per machine — users who already know about the daemon shouldn't be nagged. All filesystem I/O is best-effort: a sentinel-write failure just means the hint shows again on the next eligible run.

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

// Defined, not invoked: reads and writes the ~/.cache/qunitx sentinel file.
async function nudge(print: typeof Hint.maybePrint, write: (t: string) => void) {
  await print({ durationMs: 1200 }, { write }); // hints at most once per machine
}

Parameters

optional
opts: PrintOpts

Return Type

Promise<void>

Usage

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