Skip to content

Commit 587267c

Browse files
author
mango906
committed
feat: add missing navigator.clipboard types
1 parent 514d8d8 commit 587267c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/lib.dom.d.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3620,12 +3620,12 @@ declare var ClientRectList: {
36203620

36213621
interface Clipboard extends EventTarget {
36223622
readText(): Promise<string>;
3623+
write(data: ClipboardItem[]): Promise<void>;
36233624
writeText(data: string): Promise<void>;
36243625
}
36253626

36263627
declare var Clipboard: {
36273628
prototype: Clipboard;
3628-
new(): Clipboard;
36293629
};
36303630

36313631
/** Events providing information related to modification of the clipboard, that is cut, copy, and paste events. */
@@ -3638,6 +3638,15 @@ declare var ClipboardEvent: {
36383638
new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
36393639
};
36403640

3641+
interface ClipboardItem {
3642+
readonly types: string[]
3643+
getType: (type: string) => Promise<Blob>
3644+
}
3645+
3646+
declare var ClipboardItem: {
3647+
prototype: ClipboardItem;
3648+
}
3649+
36413650
/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
36423651
interface CloseEvent extends Event {
36433652
/**

0 commit comments

Comments
 (0)