Skip to content

VitestReporter

One entry of a vitest reporters list: the name of a built-in reporter ('default', 'junit', 'minimal', …) or a reporter instance.

Spelled out rather than derived from vitest’s own option type, whose parts (ReporterName, InlineReporter) are internal to vitest and exported from none of its entry points. Naming the two shapes directly keeps a reporters list a plain array a caller pushes onto, which the option type itself cannot be, because it is a union of an array with a single value. Vitest’s third accepted shape, a [name, options] tuple, is deliberately left out: no repository on this toolchain uses one.

Import:

import type { VitestReporter } from '@mnaoumov/typescript-dev-toolkit/test-runners/vitest-config';

Signature:

export type VitestReporter

Signature:

type VitestReporter = Reporter | string

Type: Reporter | string


Links to this page: