Skip to content

Commit

Permalink
Update the types
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod committed Dec 16, 2022
1 parent 6c90d76 commit 3105454
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/adblocker-webextension/adblocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class BlockingContext {
private readonly onRuntimeMessage: (
msg: IBackgroundCallback & { action?: string },
sender: Runtime.MessageSender,
) => Promise<Partial<IMessageFromBackground> | undefined>;
) => Promise<IMessageFromBackground | undefined>;

private readonly onCommittedHandler:
| ((details: WebNavigation.OnCommittedDetailsType) => void)
Expand Down Expand Up @@ -408,7 +408,7 @@ export class WebExtensionBlocker extends FiltersEngine {
browser: Browser,
msg: IBackgroundCallback & { action?: string },
sender: Runtime.MessageSender,
sendResponse: (response?: IMessageFromBackground) => void,
sendResponse: (response: IMessageFromBackground) => void,
): Promise<void> => {
const promises: Promise<void>[] = [];

Expand Down Expand Up @@ -560,7 +560,7 @@ export class WebExtensionBlocker extends FiltersEngine {
browser: Browser,
msg: IBackgroundCallback & { action?: string },
sender: Runtime.MessageSender,
): Promise<Partial<IMessageFromBackground> | undefined> => {
): Promise<IMessageFromBackground | {}> => {
return new Promise((resolve, reject) => {
this.handleRuntimeMessage(browser, msg, sender, resolve).catch(reject).finally(() => resolve({}));
});
Expand Down

0 comments on commit 3105454

Please sign in to comment.