- ✅ 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
67 lines
1.6 KiB
TypeScript
67 lines
1.6 KiB
TypeScript
import { Buffer } from 'buffer';
|
|
import { ReadableStream } from 'stream/web';
|
|
import * as PropertySymbol from '../PropertySymbol.js';
|
|
/**
|
|
* Reference:
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/Blob.
|
|
*
|
|
* Based on:
|
|
* https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/file-api/Blob-impl.js (MIT licensed).
|
|
*/
|
|
export default class Blob {
|
|
readonly type: string;
|
|
[PropertySymbol.buffer]: Buffer;
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param [bits] Bits.
|
|
* @param [options] Options.
|
|
* @param [options.type] MIME type.
|
|
*/
|
|
constructor(bits?: (ArrayBuffer | ArrayBufferView | Blob | Buffer | string)[], options?: {
|
|
type?: string;
|
|
});
|
|
/**
|
|
* Returns size.
|
|
*
|
|
* @returns Size.
|
|
*/
|
|
get size(): number;
|
|
/**
|
|
* Slices the blob.
|
|
*
|
|
* @param start Start.
|
|
* @param end End.
|
|
* @param contentType Content type.
|
|
* @returns New Blob.
|
|
*/
|
|
slice(start?: number, end?: number | null, contentType?: string): Blob;
|
|
/**
|
|
* Returns a Promise that resolves to a ArrayBuffer.
|
|
*
|
|
* @returns ArrayBuffer.
|
|
*/
|
|
/**
|
|
*
|
|
*/
|
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
/**
|
|
* Returns a Promise that resolves to a text.
|
|
*
|
|
* @returns Text.
|
|
*/
|
|
text(): Promise<string>;
|
|
/**
|
|
* Returns returns a ReadableStream which upon reading returns the data contained within the Blob.
|
|
*
|
|
* @returns ReadableStream
|
|
*/
|
|
stream(): ReadableStream;
|
|
/**
|
|
* Returns the object converted to string.
|
|
*
|
|
* @returns String.
|
|
*/
|
|
toString(): string;
|
|
}
|
|
//# sourceMappingURL=Blob.d.ts.map
|