codigo0/node_modules/hast-util-from-parse5/index.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

83 lines
2.1 KiB
TypeScript

import type {Position} from 'unist'
import type {VFile} from 'vfile'
export {fromParse5} from './lib/index.js'
/**
* Configuration.
*/
export interface Options {
/**
* File used to add positional info to nodes (optional).
*
* If given, the file should represent the original HTML source.
*/
file?: VFile | null | undefined
/**
* Which space the document is in (default: `'html'`).
*
* When an `<svg>` element is found in the HTML space, this package already
* automatically switches to and from the SVG space when entering and exiting
* it.
*/
space?: Space | null | undefined
/**
* Whether to add extra positional info about starting tags, closing tags,
* and attributes to elements (default: `false`).
*
* > 👉 **Note**: only used when `file` is given.
*/
verbose?: boolean | null | undefined
}
/**
* Namespace.
*/
export type Space = 'html' | 'svg'
// Register data on hast.
declare module 'hast' {
interface ElementData {
position: {
/**
* Positional info of the start tag of an element.
*
* Field added by `hast-util-from-parse5` (a utility used inside
* `rehype-parse` responsible for parsing HTML), when passing
* `verbose: true`.
*/
opening?: Position | undefined
/**
* Positional info of the end tag of an element.
*
* Field added by `hast-util-from-parse5` (a utility used inside
* `rehype-parse` responsible for parsing HTML), when passing
* `verbose: true`.
*/
closing?: Position | undefined
/**
* Positional info of the properties of an element.
*
* Field added by `hast-util-from-parse5` (a utility used inside
* `rehype-parse` responsible for parsing HTML), when passing
* `verbose: true`.
*/
properties?: Record<string, Position | undefined> | undefined
}
}
interface RootData {
/**
* Whether the document was using quirksmode.
*
* Field added by `hast-util-from-parse5` (a utility used inside
* `rehype-parse` responsible for parsing HTML).
*/
quirksMode?: boolean | undefined
}
}