blob: 48565d9a6740ebf119bf4863af24c5acd6618918 [file] [log] [blame]
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { PendingCopy } from './pending-copy';
/**
* A service for copying text to the clipboard.
*/
export declare class Clipboard {
private readonly _document;
constructor(document: any);
/**
* Copies the provided text into the user's clipboard.
*
* @param text The string to copy.
* @returns Whether the operation was successful.
*/
copy(text: string): boolean;
/**
* Prepares a string to be copied later. This is useful for large strings
* which take too long to successfully render and be copied in the same tick.
*
* The caller must call `destroy` on the returned `PendingCopy`.
*
* @param text The string to copy.
* @returns the pending copy operation.
*/
beginCopy(text: string): PendingCopy;
}