@code-pushup/models
Version:
Model definitions and validators for the Code PushUp CLI
9 lines (8 loc) • 449 B
TypeScript
import type { z } from 'zod';
export declare function createCheck<T>(findErrorFn: (value: T) => false | {
message: string;
}): z.core.CheckFn<T>;
export declare function createDuplicatesCheck<T>(keyFn: (item: T) => string, errorMsgFn: (duplicates: string[]) => string): z.core.CheckFn<T[]>;
export declare function createDuplicateSlugsCheck<T extends {
slug: string;
}>(name: 'Audit' | 'Plugin' | 'Category' | 'Group'): z.core.CheckFn<T[]>;