Skip to content

Commit 5dcecf0

Browse files
committed
chore: fix types
1 parent e1ad594 commit 5dcecf0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/actions/clipboard.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ export class Clipboard {
168168
private cutCallback(
169169
workspace: WorkspaceSvg,
170170
e: Event,
171-
shortcut: ShortcutRegistry.KeyboardShortcut | undefined,
171+
shortcut: ShortcutRegistry.KeyboardShortcut = {
172+
name: Constants.SHORTCUT_NAMES.CUT,
173+
},
172174
scope: ContextMenuRegistry.Scope,
173175
) {
174176
const didCut =
@@ -260,7 +262,9 @@ export class Clipboard {
260262
private copyCallback(
261263
workspace: WorkspaceSvg,
262264
e: Event,
263-
shortcut: ShortcutRegistry.KeyboardShortcut | undefined,
265+
shortcut: ShortcutRegistry.KeyboardShortcut = {
266+
name: Constants.SHORTCUT_NAMES.CUT,
267+
},
264268
scope: ContextMenuRegistry.Scope,
265269
) {
266270
const didCopy =
@@ -392,10 +396,14 @@ export class Clipboard {
392396
private pasteCallback(
393397
workspace: WorkspaceSvg,
394398
e: Event,
395-
shortcut: ShortcutRegistry.KeyboardShortcut | undefined,
399+
shortcut: ShortcutRegistry.KeyboardShortcut = {
400+
name: Constants.SHORTCUT_NAMES.CUT,
401+
},
396402
scope: ContextMenuRegistry.Scope,
397403
) {
398-
const didPaste = !!this.oldPasteCallback && this.oldPasteCallback();
404+
const didPaste =
405+
!!this.oldPasteCallback &&
406+
this.oldPasteCallback(workspace, e, shortcut, scope);
399407

400408
// Clear the paste hints regardless of whether something was pasted
401409
// Some implementations of paste are async and we should clear the hint

0 commit comments

Comments
 (0)