// yauzl 无官方 @types —— 遵循仓库"不引额外类型包"的先例(见 assistant.controller、mcp-sdk.d.ts),
// 只声明本项目实际用到的最小 API 面。
declare module 'yauzl' {
  import type { EventEmitter } from 'node:events';
  import type { Readable } from 'node:stream';

  export interface Entry {
    fileName: string;
  }

  export interface ZipFile extends EventEmitter {
    readEntry(): void;
    openReadStream(
      entry: Entry,
      callback: (err: Error | null, stream?: Readable) => void,
    ): void;
  }

  export interface OpenOptions {
    lazyEntries?: boolean;
  }

  export function open(
    path: string,
    options: OpenOptions,
    callback: (err: Error | null, zipfile?: ZipFile) => void,
  ): void;
}
