|
|
|
@ -31,7 +31,7 @@ interface Clip<K, T> {
|
|
|
|
|
options: T
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ClipResponse = Clip<'Text', string>
|
|
|
|
|
type ClipResponse = Clip<'PlainText', string>
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Writes plain text to the clipboard.
|
|
|
|
@ -49,7 +49,7 @@ type ClipResponse = Clip<'Text', string>
|
|
|
|
|
async function writeText(text: string, opts?: { label?: string }): Promise<void> {
|
|
|
|
|
return invoke('plugin:clipboard|write', {
|
|
|
|
|
data: {
|
|
|
|
|
kind: 'Text',
|
|
|
|
|
kind: 'PlainText',
|
|
|
|
|
options: {
|
|
|
|
|
label: opts?.label,
|
|
|
|
|
text
|
|
|
|
|