import { Rule } from "./types-jmHZQT0x.js"; import ts from "typescript"; //#region src/ruleTester.d.ts declare function print(...args: any[]): void; type CaseProps Rule> = { /** Parse code as TSX */ tsx?: boolean; compilerOptions?: ts.CompilerOptions; options?: Parameters[0]; code: string; }; type ValidTestCase Rule> = CaseProps | string; type InvalidTestCase Rule> = CaseProps & { error?: string; errors?: ({ message: string; line?: number; column?: number; endColumn?: number; endLine?: number; suggestions?: { message: string; output: string; }[]; } | [message: string, line?: number, column?: number])[]; }; /** * Output API is still a bit raw (it prints differences to the console and returns a 'hasError' boolean) * Feel free to open an issue if you need help or have ideas for improvements. */ declare const ruleTester: Rule>({ ruleFn, tsx, valid, invalid }: { ruleFn: RuleFn; /** Parse code as TSX, @default false */ tsx?: boolean; valid: ValidTestCase[]; invalid: InvalidTestCase[]; }) => boolean; //#endregion export { InvalidTestCase, ValidTestCase, print, ruleTester };