codigo0/node_modules/ts-interface-checker/dist/util.d.ts
planetazuzu 5d7a6500fe refactor: Fase 1 - Clean Architecture, refactorización modular y eliminación de duplicidades
-  Ticket 1.1: Estructura Clean Architecture en backend
-  Ticket 1.2: Schemas Zod compartidos
-  Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares)
-  Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares)
-  Ticket 1.5: Eliminación de duplicidades (~50 líneas)

Cambios principales:
- Creada estructura Clean Architecture en backend/src/
- Schemas Zod compartidos en backend/src/shared/schemas/
- Refactorización modular de drugs y procedures
- Utilidades genéricas en src/utils/ (filter, validation)
- Eliminados scripts obsoletos y documentación antigua
- Corregidos errores: QueryClient, import test-error-handling
- Build verificado y funcionando correctamente
2026-01-25 21:09:47 +01:00

56 lines
2 KiB
TypeScript

/**
* Error thrown by validation. Besides an informative message, it includes the path to the
* property which triggered the failure.
*/
export declare class VError extends Error {
path: string;
constructor(path: string, message: string);
}
/**
* IContext is used during validation to collect error messages. There is a "noop" fast
* implementation that does not pay attention to messages, and a full implementation that does.
*/
export interface IContext {
fail(relPath: string | number | null, message: string | null, score: number): false;
unionResolver(): IUnionResolver;
resolveUnion(ur: IUnionResolver): void;
}
/**
* This helper class is used to collect error messages reported while validating unions.
*/
export interface IUnionResolver {
createContext(): IContext;
}
/**
* IErrorDetail describes errors as returned by the validate() and validateStrict() methods.
*/
export interface IErrorDetail {
path: string;
message: string;
nested?: IErrorDetail[];
}
/**
* Fast implementation of IContext used for first-pass validation. If that fails, we can validate
* using DetailContext to collect error messages. That's faster for the common case when messages
* normally pass validation.
*/
export declare class NoopContext implements IContext, IUnionResolver {
fail(relPath: string | number | null, message: string | null, score: number): false;
unionResolver(): IUnionResolver;
createContext(): IContext;
resolveUnion(ur: IUnionResolver): void;
}
/**
* Complete implementation of IContext that collects meaningfull errors.
*/
export declare class DetailContext implements IContext {
private _propNames;
private _messages;
private _score;
fail(relPath: string | number | null, message: string | null, score: number): false;
unionResolver(): IUnionResolver;
resolveUnion(unionResolver: IUnionResolver): void;
getError(path: string): VError;
getErrorDetail(path: string): IErrorDetail | null;
}