import type { PortableResource } from '../parsing/protocol/messages'; import type { ParseProgress } from '../parsing/types'; import type { SpreadsheetWorkbook } from '../spreadsheet/types'; /** 汇总XLS/BIFF8 解析当前步骤需要共享的上下文。 */ export type XlsCoreContext = { /** 在长任务检查点报告进度并响应取消信号。 */ checkpoint(progress?: ParseProgress): Promise; /** 处理完成后生成的输出结果。 */ output?: XlsCoreOutput; }; /** XLS 核心解析向调用方流式提交资源和工作表的接口。 */ export type XlsCoreOutput = { /** 接收解析器产生的可移植资源分块。 */ resource(resource: PortableResource): Promise; /** 接收解析产生的单张工作表。 */ sheet(index: number, revision: number, sheet: SpreadsheetWorkbook['sheets'][number]): Promise; }; /** XLS 核心解析生成的工作簿和可移植资源。 */ export type XlsCoreResult = { /** 当前处理的标准化工作簿。 */ workbook: SpreadsheetWorkbook; /** 持有的图片、字体或对象 URL 等资源;文档释放时需同步清理。 */ resources: PortableResource[]; }; /** 解析 XLS 二进制并返回环境无关的工作簿与资源。 */ export declare function parseXlsCore(input: ArrayBuffer | Uint8Array, context: XlsCoreContext): Promise;