Skip to content

Commit

Permalink
fix: openTabFromContentScript TS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
doprz committed Mar 6, 2024
1 parent ced2997 commit 3a48859
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/views/lib/openNewTabFromContentScript.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { createMessenger } from 'chrome-extension-toolkit';

type MyMessages = {
openNewTab: {
data: { url: string };
};
openNewTab: (data: { url: string }) => void;
};

const messenger = createMessenger<MyMessages>('background');
Expand All @@ -16,7 +14,6 @@ const messenger = createMessenger<MyMessages>('background');
* with the background script.
*/
export async function openTabFromContentScript(url: string) {
// @ts-ignore
messenger
.openNewTab({ url })
.then(() => {
Expand Down

0 comments on commit 3a48859

Please sign in to comment.