UNPKG

sussudio

Version:

An unofficial VS Code Internal API

27 lines (26 loc) 1.52 kB
/*--------------------------------------------------------------------------------------------- * 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 "../../../base/common/cancellation.mjs"; import { Event } from "../../../base/common/event.mjs"; import { URI } from "../../../base/common/uri.mjs"; import { Client, IChannel, IClientRouter, IConnectionHub, IServerChannel } from "../../../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>>; }