import { Injector } from '@opensumi/di';
import { IRPCProtocol } from '@opensumi/ide-connection/lib/common/rpc/multiplexer';
import { IDisposable } from '@opensumi/ide-core-common';
import { IExtension } from '..';
export interface IBrowserRequireInterceptorArgs {
    injector: Injector;
    extension: IExtension;
    rpcProtocol?: IRPCProtocol;
}
export interface IRequireInterceptor<T> {
    moduleName: string;
    load(request: T): any;
}
export declare const IRequireInterceptorService: unique symbol;
export interface IRequireInterceptorService<T = any> {
    registerRequireInterceptor(interceptor: IRequireInterceptor<T>): IDisposable;
    getRequireInterceptor(moduleName: string): IRequireInterceptor<T> | undefined;
}
export declare const RequireInterceptorContribution: unique symbol;
export interface RequireInterceptorContribution {
    registerRequireInterceptor(registry: IRequireInterceptorService): void;
}
export declare class RequireInterceptorService<T> implements IRequireInterceptorService<T> {
    private readonly logger;
    private readonly registry;
    registerRequireInterceptor(interceptor: IRequireInterceptor<T>): IDisposable;
    getRequireInterceptor(moduleName: string): IRequireInterceptor<T> | undefined;
}
//# sourceMappingURL=require-interceptor.d.ts.map