@akanjs/signal 0.9.46 → 0.9.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/signal",
3
- "version": "0.9.46",
3
+ "version": "0.9.47",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/fetch.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare const fetch: {
2
- publishPing: (option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<void>;
3
2
  ping: (option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<string>;
3
+ publishPing: (option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<void>;
4
4
  pingBody: (args_0: string, option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<string>;
5
5
  pingParam: (args_0: string, option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<string>;
6
6
  pingQuery: (args_0: string, option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<string>;
@@ -13,9 +13,9 @@ export declare const fetch: {
13
13
  listenWsPing: (handleEvent: (data: string & {
14
14
  __Returns__: "Emit";
15
15
  }) => any, options?: import("@akanjs/common").FetchPolicy) => () => void;
16
- subscribePubsubPing: (onData: (data: Omit<string & {
16
+ subscribePubsubPing: (onData: (data: string & {
17
17
  __Returns__: "Subscribe";
18
- }, "__Returns__">) => void, fetchPolicy?: import("@akanjs/common").FetchPolicy<any> | undefined) => () => void;
18
+ }) => void, fetchPolicy?: import("@akanjs/common").FetchPolicy<any> | undefined) => () => void;
19
19
  client: import("./client").Client;
20
20
  clone: (option?: {
21
21
  jwt: string | null;
@@ -24,9 +24,9 @@ export declare const fetch: {
24
24
  listenWsPing: (handleEvent: (data: string & {
25
25
  __Returns__: "Emit";
26
26
  }) => any, options?: import("@akanjs/common").FetchPolicy) => () => void;
27
- subscribePubsubPing: (onData: (data: Omit<string & {
27
+ subscribePubsubPing: (onData: (data: string & {
28
28
  __Returns__: "Subscribe";
29
- }, "__Returns__">) => void, fetchPolicy?: import("@akanjs/common").FetchPolicy<any> | undefined) => () => void;
29
+ }) => void, fetchPolicy?: import("@akanjs/common").FetchPolicy<any> | undefined) => () => void;
30
30
  publishPing: (option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<void>;
31
31
  ping: (option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<string>;
32
32
  pingBody: (args_0: string, option?: import("@akanjs/common").FetchPolicy<any> | undefined) => Promise<string>;
package/src/gql.d.ts CHANGED
@@ -169,9 +169,12 @@ type ListenMethods<Sig> = {
169
169
  [K in keyof Sig as K extends string ? HasMarker<Sig[K], "Emit"> extends true ? `listen${Capitalize<K>}` : never : never]: Sig[K] extends (...args: any) => infer R ? (handleEvent: (data: Awaited<R>) => any, options?: FetchPolicy) => () => void : never;
170
170
  };
171
171
  export type GetWsMessageOf<Sig> = EmitMethods<Sig> & ListenMethods<Sig>;
172
+ type RemoveReturnMeta<Return> = Return extends infer R & {
173
+ __Returns__: any;
174
+ } ? R : Return;
172
175
  type GenerateSubscribeMethod<Fn> = Fn extends (...args: infer Args) => infer R ? (...args: [
173
176
  ...args: FilterOutInternalArgs<Args>,
174
- onData: (data: Omit<Awaited<R>, "__Returns__">) => void,
177
+ onData: (data: RemoveReturnMeta<Awaited<R>>) => void,
175
178
  fetchPolicy?: FetchPolicy
176
179
  ]) => () => void : never;
177
180
  export type GetWsPubsubOf<Sig> = {