Add ClipboardItem to externs
TypeScript 4.4 added types for ClipboardItem from the Clipboard APIs (https://www.w3.org/TR/clipboard-apis/) to its standard lib.dom.d.ts typings. This adds the same to the default JavaScript externs.
*/
function Clipboard() {}
+/**
+ * @return {!Promise<!Array<!ClipboardItem>>}
+ */
+Clipboard.prototype.read = function() {};
+
/**
* @return {!Promise<string>}
*/
Clipboard.prototype.readText = function() {};
+/**
+ * @param {!Array<!ClipboardItem>} data
+ * @return {!Promise<void>}
+ */
+Clipboard.prototype.write = function(data) {};
+
/**
* @param {string} text
* @return {!Promise<void>}
@@ -38,3 +49,26 @@ Clipboard.prototype.writeText = function(text) {};
/** @const {!Clipboard} */
Navigator.prototype.clipboard;
+
+/**
+ * @constructor
+ * @param {!Object<string, (!string|!Blob|!Promise<!string>|!Promise<!Blob>)>}
+ * items
+ * @param {ClipboardItemOptions=} options
+ */
+function ClipboardItem(items, options) {}
+
+/** @type {!Array<!string>} */
+ClipboardItem.prototype.types;
+
+/**
+ * @param {string} type
+ * @return {!Promise<!Blob>}
+ */
+ClipboardItem.prototype.getType = function(type) {};
+
+/** @record */
+function ClipboardItemOptions() {}
+
+/** @type {string|undefined} */
+ClipboardItemOptions.prototype.presentationStyle;
