socket-function 0.8.18 → 0.8.19

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.
@@ -3,7 +3,7 @@ module.allowclient = true;
3
3
  import debugbreak from "debugbreak";
4
4
  import * as tls from "tls";
5
5
  import { getCallObj } from "./src/nodeProxy";
6
- import { Args } from "./src/types";
6
+ import { Args, MaybePromise } from "./src/types";
7
7
 
8
8
  export const socket = Symbol("socket");
9
9
 
@@ -45,7 +45,7 @@ export interface FullCallType extends CallType {
45
45
  }
46
46
 
47
47
  export interface SocketFunctionHook<ExposedType extends SocketExposedInterface = SocketExposedInterface, CallContext extends CallContextType = CallContextType> {
48
- (config: HookContext<ExposedType, CallContext>): Promise<void>;
48
+ (config: HookContext<ExposedType, CallContext>): MaybePromise<void>;
49
49
  }
50
50
  export type HookContext<ExposedType extends SocketExposedInterface = SocketExposedInterface, CallContext extends CallContextType = CallContextType> = {
51
51
  call: CallType;
@@ -60,7 +60,7 @@ export type ClientHookContext<ExposedType extends SocketExposedInterface = Socke
60
60
  overrideResult?: unknown;
61
61
  };
62
62
  export interface SocketFunctionClientHook<ExposedType extends SocketExposedInterface = SocketExposedInterface, CallContext extends CallContextType = CallContextType> {
63
- (config: ClientHookContext<ExposedType, CallContext>): Promise<void>;
63
+ (config: ClientHookContext<ExposedType, CallContext>): MaybePromise<void>;
64
64
  }
65
65
 
66
66
  export type CallContextType = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.8.18",
3
+ "version": "0.8.19",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {