- ✅ 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
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
/**
|
||
* Pass a hast tree through an HTML parser, which will fix nesting, and turn
|
||
* raw nodes into actual nodes.
|
||
*
|
||
* @param {Nodes} tree
|
||
* Original hast tree to transform.
|
||
* @param {Options | null | undefined} [options]
|
||
* Configuration (optional).
|
||
* @returns {Nodes}
|
||
* Parsed again tree.
|
||
*/
|
||
export function raw(tree: Nodes, options?: Options | null | undefined): Nodes;
|
||
/**
|
||
* Info passed around about the current state.
|
||
*/
|
||
export type State = {
|
||
/**
|
||
* Add a hast node to the parser.
|
||
*/
|
||
handle: (node: Nodes) => undefined;
|
||
/**
|
||
* User configuration.
|
||
*/
|
||
options: Options;
|
||
/**
|
||
* Current parser.
|
||
*/
|
||
parser: Parser<DefaultTreeAdapterMap>;
|
||
/**
|
||
* Whether there are stitches.
|
||
*/
|
||
stitches: boolean;
|
||
};
|
||
/**
|
||
* Custom comment-like value we pass through parse5, which contains a
|
||
* replacement node that we’ll swap back in afterwards.
|
||
*/
|
||
export type Stitch = {
|
||
/**
|
||
* Node type.
|
||
*/
|
||
type: "comment";
|
||
/**
|
||
* Replacement value.
|
||
*/
|
||
value: {
|
||
stitch: Nodes;
|
||
};
|
||
};
|
||
import type { Nodes } from 'hast';
|
||
import type { Options } from 'hast-util-raw';
|
||
import { Parser } from 'parse5';
|
||
import type { DefaultTreeAdapterMap } from 'parse5';
|
||
//# sourceMappingURL=index.d.ts.map
|