-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
Description
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.
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
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'
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this