UNPKG

cspell

Version:

A Spelling Checker for Code!

50 lines • 2.54 kB
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-Cuobl1Eb.js"; import { i as LinterCliOptions, o as TraceOptions, s as FinalizedReporter, t as BaseOptions } from "./options-CI-Jag3K.js"; import { CSpellReporter, ReporterConfiguration } from "@cspell/cspell-types"; export * from "@cspell/cspell-types"; type Log = (format?: any, ...params: any[]) => void; /** * The parts of an output stream, such as `process.stdout`, that the console uses. */ interface IOStream { write(chunk: string): boolean; isTTY: boolean; rows: number; columns: number; hasColors?(count?: number): boolean; clearLine?(dir: -1 | 0 | 1, callback?: () => void): boolean; getColorDepth?(env?: object): number; } interface IConsole { readonly log: Log; readonly error: Log; readonly info: Log; readonly warn: Log; readonly stderrChannel: Channel; readonly stdoutChannel: Channel; } interface Channel { stream: IOStream; write: (msg: string) => void; writeLine: (msg: string) => void; clearLine: (dir: -1 | 0 | 1, callback?: () => void) => boolean; printLine: (format?: any, ...params: any[]) => void; getColorLevel: () => 0 | 1 | 2 | 3; } type ReporterConsole = IConsole; interface CSpellReporterConfiguration extends Readonly<ReporterConfiguration>, Readonly<LinterCliOptions> { /** * The console to use for reporting. * @since 8.11.1 */ readonly console?: ReporterConsole; } interface CSpellReporterModule { getReporter: <T>(settings: T, config: CSpellReporterConfiguration) => CSpellReporter; } interface ReporterOptions extends Pick<LinterCliOptions, "color" | "debug" | "issues" | "issuesSummaryReport" | "legacy" | "progress" | "relative" | "root" | "showContext" | "showPerfSummary" | "showSuggestions" | "silent" | "summary" | "verbose" | "verboseLevel" | "wordsOnly"> { fileGlobs: string[]; } declare function getReporter(options: ReporterOptions, config?: CSpellReporterConfiguration): FinalizedReporter; export { type AppError, type BaseOptions, type LinterCliOptions as CSpellApplicationOptions, type CSpellReporterConfiguration, type CSpellReporterModule, type CheckTextResult, IncludeExcludeFlag, type TraceOptions, type TraceResult, checkText, createInit, getReporter as getDefaultReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace }; //# sourceMappingURL=index.d.ts.map