Files
azuredatastudio/src/vs/workbench/api/browser/mainThreadClipboard.ts
Anthony Dresser 0b7e7ddbf9 Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
2019-07-15 22:35:46 -07:00

30 lines
1.0 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { MainContext, MainThreadClipboardShape } from '../common/extHost.protocol';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
@extHostNamedCustomer(MainContext.MainThreadClipboard)
export class MainThreadClipboard implements MainThreadClipboardShape {
constructor(
_context: any,
@IClipboardService private readonly _clipboardService: IClipboardService,
) { }
dispose(): void {
// nothing
}
$readText(): Promise<string> {
return this._clipboardService.readText();
}
$writeText(value: string): Promise<void> {
return this._clipboardService.writeText(value);
}
}