webext-messenger 0.22.0-1 → 0.22.0-3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
1
  export * from "./receiver.js";
2
2
  export * from "./sender.js";
3
3
  export * from "./types.js";
4
+ export { getThisTarget } from "./thisTarget.js";
@@ -2,5 +2,6 @@
2
2
  export * from "./receiver.js";
3
3
  export * from "./sender.js";
4
4
  export * from "./types.js";
5
+ export { getThisTarget } from "./thisTarget.js";
5
6
  import { initPrivateApi } from "./thisTarget.js";
6
7
  initPrivateApi();
@@ -1,5 +1,5 @@
1
- import { AnyTarget, Message, MessengerMeta, Sender } from "./types.js";
1
+ import { AnyTarget, KnownTarget, Message, MessengerMeta, Sender } from "./types.js";
2
2
  export declare function getActionForMessage(from: Sender, message: Message): "respond" | "forward" | "ignore";
3
3
  export declare function __getTabData(this: MessengerMeta): AnyTarget;
4
- export declare function getThisTarget(): Promise<AnyTarget>;
4
+ export declare function getThisTarget(): Promise<KnownTarget>;
5
5
  export declare function initPrivateApi(): void;
@@ -52,6 +52,11 @@ export interface AnyTarget {
52
52
  frameId?: number;
53
53
  page?: string;
54
54
  }
55
+ export interface KnownTarget {
56
+ tabId?: number;
57
+ frameId?: number;
58
+ page: string;
59
+ }
55
60
  export interface Target {
56
61
  tabId: number;
57
62
  frameId?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webext-messenger",
3
- "version": "0.22.0-1",
3
+ "version": "0.22.0-3",
4
4
  "description": "Browser Extension component messaging framework",
5
5
  "keywords": [],
6
6
  "repository": "pixiebrix/webext-messenger",