mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
Disallow arbitrary objects in clipboard.write. (#13595)
This commit is contained in:
@@ -95,6 +95,7 @@ clipboard.clear();
|
||||
clipboard.write({
|
||||
html: '<html></html>',
|
||||
text: 'Hello World!',
|
||||
bookmark: "Bookmark name",
|
||||
image: clipboard.readImage()
|
||||
});
|
||||
|
||||
|
||||
7
electron/index.d.ts
vendored
7
electron/index.d.ts
vendored
@@ -1864,12 +1864,7 @@ declare namespace Electron {
|
||||
/**
|
||||
* Writes data to the clipboard.
|
||||
*/
|
||||
write(data: {
|
||||
text?: string;
|
||||
rtf?: string;
|
||||
html?: string;
|
||||
image?: NativeImage;
|
||||
}, type?: ClipboardType): void;
|
||||
write(data: { text: string; bookmark?: string; } | { rtf: string; } | { html: string; } | { image: NativeImage; }, type?: ClipboardType): void;
|
||||
/**
|
||||
* @returns An Object containing title and url keys representing the bookmark in the clipboard.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user