/** * @packageDocumentation * * Utilities for working with bundled formatter implementations. */ import type { Formatter } from './types.js'; import { stylishFormatter } from '../stylish/index.js'; import { jsonFormatter } from '../json/index.js'; import { sarifFormatter } from '../sarif/index.js'; /** * Tuples mapping built-in formatter names to implementations. */ declare const builtInFormatterEntries: readonly [readonly ["stylish", typeof stylishFormatter], readonly ["json", typeof jsonFormatter], readonly ["sarif", typeof sarifFormatter]]; /** * Names of bundled formatter implementations. */ export type BuiltInFormatterName = (typeof builtInFormatterEntries)[number][0]; /** * Ordered list of built-in formatter identifiers. * * @example * ```ts * for (const name of builtInFormatterNames) { * console.log(name); * } * ``` */ export declare const builtInFormatterNames: ("stylish" | "json" | "sarif")[]; /** * Mapping of built-in formatter names to their implementations. * * @example * ```ts * const formatter = builtInFormatters.get('json'); * formatter?.([], true); * ``` */ export declare const builtInFormatters: Map<"stylish" | "json" | "sarif", Formatter>; /** * Determine whether a formatter name refers to a bundled implementation. * * @param name - Name to test. * @returns True if `name` is a built-in formatter identifier. * * @example * isBuiltInFormatterName('json'); * // => true * isBuiltInFormatterName('custom'); * // => false */ export declare function isBuiltInFormatterName(name: string): name is BuiltInFormatterName; export {}; //# sourceMappingURL=builtins.d.ts.map