lib Update Request
Configuration Check
My compilation target is ES2015 and my lib is the default.
Missing / Incorrect Definition
there is no type ClipboardItem constructor and read, write method on Navigator.Clipboard
It has already been mentioned on a similar issue before.
#26728
Chrome supports write method from v66 and also ClipboardItem but now current version is v90. I think it is stable enough.
How about adding at least write method and ClipboardItem without constructor like this
mango906@587267c
Sample Code
// sampleBlob blob
const blob = '';
navigator.clipboard.write([
new ClipboardItem({
'image/png': blob,
}),
]);
error TS2304: Cannot find name 'ClipboardItem'
error TS2339: Property 'write' does not exist on type 'Clipboard'
playground
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API
lib Update Request
Configuration Check
My compilation target is
ES2015and my lib isthe default.Missing / Incorrect Definition
there is no type
ClipboardItemconstructor andread,writemethod onNavigator.ClipboardIt has already been mentioned on a similar issue before.
#26728
Chrome supports
writemethod from v66 and alsoClipboardItembut now current version is v90. I think it is stable enough.How about adding at least
writemethod andClipboardItemwithout constructor like thismango906@587267c
Sample Code
playground
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API