file2md
Version:
A TypeScript library for converting various document types (PDF, DOCX, XLSX, PPTX, HWP, HWPX) into Markdown with image and layout preservation
50 lines • 1.56 kB
TypeScript
/**
* Browser API polyfills for Node.js environment
* Provides minimal implementations of browser APIs needed by hwp.js
*/
/**
* IntersectionObserver polyfill for Node.js
* Provides a minimal implementation that doesn't actually observe anything
*/
export declare class IntersectionObserver {
root: Element | Document | null;
rootMargin: string;
thresholds: readonly number[];
private callback;
private options;
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit);
observe(target: Element): void;
unobserve(_target: Element): void;
disconnect(): void;
takeRecords(): IntersectionObserverEntry[];
}
/**
* ResizeObserver polyfill for Node.js
*/
export declare class ResizeObserver {
private callback;
constructor(callback: ResizeObserverCallback);
observe(target: Element, _options?: ResizeObserverOptions): void;
unobserve(_target: Element): void;
disconnect(): void;
}
/**
* MutationObserver polyfill for Node.js
*/
export declare class MutationObserver {
private callback;
constructor(callback: MutationCallback);
observe(_target: Node, _options?: MutationObserverInit): void;
disconnect(): void;
takeRecords(): MutationRecord[];
}
/**
* Setup polyfills in the global scope
* This should be called before importing hwp.js
*/
export declare function setupBrowserPolyfills(): void;
/**
* Cleanup polyfills from global scope
*/
export declare function cleanupBrowserPolyfills(): void;
//# sourceMappingURL=browser-polyfills.d.ts.map