mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 15:24:40 +01:00
We want to prevent mistaken changes that do something like this:
```ts
foo.onEvent = () => { ... };
```
When they almost always mean:
```ts
foo.onEvent(() => { ... })
```
20 lines
642 B
TypeScript
20 lines
642 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
declare module 'vscode' {
|
|
|
|
export namespace env {
|
|
export function getDataChannel<T>(channelId: string): DataChannel<T>;
|
|
}
|
|
|
|
export interface DataChannel<T = unknown> {
|
|
readonly onDidReceiveData: Event<DataChannelEvent<T>>;
|
|
}
|
|
|
|
export interface DataChannelEvent<T> {
|
|
data: T;
|
|
}
|
|
}
|