@binkylabs/muzzle
Version:
A muzzle for your TypeSpec linting rules. It's experimental, slightly unethical, and definitely effective.
23 lines (22 loc) • 1.06 kB
TypeScript
import { Program } from "@typespec/compiler";
/**
* Adds suppress directives for all warnings in the TypeSpec program.
* @param p The TypeSpec program
* @param options Options for suppressing warnings
* @returns A promise that resolves when suppressions have been applied
*/
export declare function suppressEverything(p: Program, options?: Partial<Omit<SuppressionOptions, "entryPoint" | "ruleSets">>): Promise<void>;
/**
* Parses a TypeSpec program from the given entry point and applies suppressions for all warnings.
* @param options Options for suppressing warnings
*/
export declare function parseTypeSpecAndSuppressEverything(options: SuppressionOptions): Promise<void>;
/** Options for suppressing TypeSpec diagnostics */
export interface SuppressionOptions {
/** The entry point file for the TypeSpec program */
entryPoint: string;
/** The rule sets to apply. At least one rule set must be provided. */
ruleSets: `${string}/${string}`[];
/** The message to include with each suppression directive */
message?: string;
}