11 lines
No EOL
304 B
TypeScript
11 lines
No EOL
304 B
TypeScript
import { clipboard } from "@metro/common";
|
|
|
|
// TODO: Remove/deprecate this, the clipboard module works the same way.
|
|
|
|
export default function copyText(content: string) {
|
|
try {
|
|
clipboard.setString(content);
|
|
} catch (e) {
|
|
throw new Error("Failed to set clipboard content.");
|
|
}
|
|
} |