@theia/core
Version:
Theia is a cloud & desktop IDE framework implemented in TypeScript.
18 lines • 783 B
TypeScript
import { Event } from '../common/event';
import { MaybePromise } from '../common/types';
export declare const ClipboardService: unique symbol;
/**
* Access to the system clipboard. Reading may require a user permission prompt in browsers.
*/
export interface ClipboardService {
/** Returns the clipboard text, or an empty string if it cannot be read. */
readText(): MaybePromise<string>;
/** Writes the given text to the clipboard. */
writeText(value: string): MaybePromise<void>;
/**
* Emitted with the written text after {@link writeText} updated the clipboard.
* Such writes dispatch no DOM `copy` event, so this is the only way to observe them.
*/
readonly onDidWriteText?: Event<string>;
}
//# sourceMappingURL=clipboard-service.d.ts.map