import { type ZodTypeAny, z } from "zod"; import type { IPackage } from "../../package/package.js"; import type { AttachmentData, Attachments } from "../../attachments/Attachments.js"; declare const LintTypes: z.ZodUnion<[z.ZodLiteral<"error">, z.ZodLiteral<"warning">]>; export type ILintTypes = z.infer; interface ISharedLintCheckParams { name: string; checkParams?: () => ZodTypeAny; } export interface IBaseLintCheck extends ISharedLintCheckParams { check: (pkg: IPackage, params: T) => string | string[] | void; } export interface ILintCheckWithAttachments extends ISharedLintCheckParams { check: (pkg: IPackage>, params: T) => string | string[] | void; attachments: A; } export type ILintCheck = A extends {} ? ILintCheckWithAttachments : IBaseLintCheck; type IBaseLintTuple

= P extends {} ? [ILintTypes, IBaseLintCheck

, P] : [ILintTypes, IBaseLintCheck

]; type ILintTupleWithAttachmentsTuple = P extends {} ? [ILintTypes, ILintCheckWithAttachments, P] : [ILintTypes, ILintCheckWithAttachments]; export type LintRuleTuple = ILintCheck> = C extends ILintCheck ? ILintTupleWithAttachmentsTuple : C extends ILintCheck ? IBaseLintTuple

: never; export declare function hasAttachments

(check: IBaseLintCheck

| ILintCheckWithAttachments): check is ILintCheckWithAttachments; export declare const ZodLintRule: z.ZodType<["error" | "warning", IBaseLintCheck, any] | ["error" | "warning", IBaseLintCheck], z.ZodTypeDef, ["error" | "warning", IBaseLintCheck, any] | ["error" | "warning", IBaseLintCheck]>; export declare function createRule

(...args: IBaseLintTuple

): IBaseLintTuple

; export declare function createRuleWithAttachment

(...args: ILintTupleWithAttachmentsTuple): ILintTupleWithAttachmentsTuple; export declare const LintFile: z.ZodObject<{ rules: z.ZodArray, any] | ["error" | "warning", IBaseLintCheck], z.ZodTypeDef, ["error" | "warning", IBaseLintCheck, any] | ["error" | "warning", IBaseLintCheck]>, "many">; }, "strip", ZodTypeAny, { rules: (["error" | "warning", IBaseLintCheck, any] | ["error" | "warning", IBaseLintCheck])[]; }, { rules: (["error" | "warning", IBaseLintCheck, any] | ["error" | "warning", IBaseLintCheck])[]; }>; export type ILintFile = z.infer; export {};