// 为Webpack/Rspack API提供类型定义
declare namespace __WebpackModuleApi {
  interface RequireContext {
    keys(): string[];
    (id: string): any;
    <T>(id: string): T;
    resolve(id: string): string;
    /** 用于标识上下文模块的id */
    id: string;
  }
}

interface NodeRequire {
  context(
    directory: string,
    useSubdirectories?: boolean,
    regExp?: RegExp
  ): __WebpackModuleApi.RequireContext;
} 