@sussudio/platform
Version:
Internal APIs for VS Code's service injection the base services.
39 lines (37 loc) • 1.51 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CancellationToken } from '@sussudio/base/common/cancellation.mjs';
import { Event } from '@sussudio/base/common/event.mjs';
import { URI } from '@sussudio/base/common/uri.mjs';
import {
Client,
IChannel,
IClientRouter,
IConnectionHub,
IServerChannel,
} from '@sussudio/base/parts/ipc/common/ipc.mjs';
import { IOpenURLOptions, IURLHandler } from './url.mjs';
export declare class URLHandlerChannel implements IServerChannel {
private handler;
constructor(handler: IURLHandler);
listen<T>(_: unknown, event: string): Event<T>;
call(_: unknown, command: string, arg?: any): Promise<any>;
}
export declare class URLHandlerChannelClient implements IURLHandler {
private channel;
constructor(channel: IChannel);
handleURL(uri: URI, options?: IOpenURLOptions): Promise<boolean>;
}
export declare class URLHandlerRouter implements IClientRouter<string> {
private next;
constructor(next: IClientRouter<string>);
routeCall(
hub: IConnectionHub<string>,
command: string,
arg?: any,
cancellationToken?: CancellationToken,
): Promise<Client<string>>;
routeEvent(_: IConnectionHub<string>, event: string): Promise<Client<string>>;
}