Skip to content

Commit ebe2338

Browse files
committed
chore: fix types
1 parent e7a78a7 commit ebe2338

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
@@ -171,7 +171,9 @@ export class Clipboard {
171171
private cutCallback(
172172
workspace: WorkspaceSvg,
173173
e: Event,
174-
shortcut: ShortcutRegistry.KeyboardShortcut | undefined,
174+
shortcut: ShortcutRegistry.KeyboardShortcut = {
175+
name: Constants.SHORTCUT_NAMES.CUT,
176+
},
175177
scope: ContextMenuRegistry.Scope,
176178
) {
177179
const didCut =
@@ -265,7 +267,9 @@ export class Clipboard {
265267
private copyCallback(
266268
workspace: WorkspaceSvg,
267269
e: Event,
268-
shortcut: ShortcutRegistry.KeyboardShortcut | undefined,
270+
shortcut: ShortcutRegistry.KeyboardShortcut = {
271+
name: Constants.SHORTCUT_NAMES.CUT,
272+
},
269273
scope: ContextMenuRegistry.Scope,
270274
) {
271275
const didCopy =
@@ -397,10 +401,14 @@ export class Clipboard {
397401
private pasteCallback(
398402
workspace: WorkspaceSvg,
399403
e: Event,
400-
shortcut: ShortcutRegistry.KeyboardShortcut | undefined,
404+
shortcut: ShortcutRegistry.KeyboardShortcut = {
405+
name: Constants.SHORTCUT_NAMES.CUT,
406+
},
401407
scope: ContextMenuRegistry.Scope,
402408
) {
403-
const didPaste = !!this.oldPasteCallback && this.oldPasteCallback();
409+
const didPaste =
410+
!!this.oldPasteCallback &&
411+
this.oldPasteCallback(workspace, e, shortcut, scope);
404412

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

0 commit comments

Comments
 (0)