declapract
Version:
A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.
33 lines (32 loc) • 1.08 kB
TypeScript
import { DomainObject } from 'domain-objects';
import Joi from 'joi';
import { FileCheckContext } from './FileCheckContext';
import { FileCheckPurpose, FileCheckType, type FileFixFunction } from './FileCheckDeclaration';
export declare enum FileEvaluationResult {
PASS = "PASS",
FAIL = "FAIL"
}
export declare const hasFailed: (evaluation: {
result: FileEvaluationResult;
}) => boolean;
export declare const hasPassed: (evaluation: {
result: FileEvaluationResult;
}) => boolean;
export declare const isFixableCheck: (evaluation: FileCheckEvaluation) => boolean;
/**
* the result of evaluating a check on a file
*/
export interface FileCheckEvaluation {
practiceRef: string;
purpose: FileCheckPurpose;
type: FileCheckType;
required: boolean;
path: string;
result: FileEvaluationResult;
reason: string | null;
fix: FileFixFunction | null;
context: FileCheckContext;
}
export declare class FileCheckEvaluation extends DomainObject<FileCheckEvaluation> implements FileCheckEvaluation {
static schema: Joi.ObjectSchema<any>;
}