socket-function 0.8.22 → 0.8.23

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/SocketFunction.ts CHANGED
@@ -43,12 +43,7 @@ export class SocketFunction {
43
43
  shape: Shape
44
44
  ):
45
45
  (
46
- // Essentially just returns SocketRegistered
47
- ExtractShape<ClassInstance, Shape> extends SocketExposedInterface
48
- ? SocketRegistered<ExtractShape<ClassInstance, Shape>, CallContext>
49
- : {
50
- error: "invalid shape";
51
- } & PickByType<ExtractShape<ClassInstance, Shape>, string>
46
+ SocketRegistered<ExtractShape<ClassInstance, Shape>, CallContext>
52
47
  ) {
53
48
 
54
49
  registerClass(classGuid, instance as SocketExposedInterface, shape as any as SocketExposedShape);
@@ -129,11 +124,11 @@ export class SocketFunction {
129
124
  public static setDefaultHTTPCall<
130
125
  Registered extends SocketRegistered,
131
126
  FunctionName extends keyof Registered["nodes"][""] & string,
132
- >(
133
- registered: Registered,
134
- functionName: FunctionName,
135
- ...args: Args<Registered["nodes"][""][FunctionName]>
136
- ) {
127
+ >(
128
+ registered: Registered,
129
+ functionName: FunctionName,
130
+ ...args: Args<Registered["nodes"][""][FunctionName]>
131
+ ) {
137
132
  setDefaultHTTPCall({
138
133
  classGuid: registered._classGuid,
139
134
  functionName,
@@ -67,7 +67,7 @@ export type CallContextType = {
67
67
  [key: string]: unknown;
68
68
  };
69
69
 
70
- export interface SocketRegistered<ExposedType extends SocketExposedInterface = SocketExposedInterface, DynamicCallContext extends CallContextType = CallContextType> {
70
+ export interface SocketRegistered<ExposedType = any, DynamicCallContext extends CallContextType = CallContextType> {
71
71
  nodes: {
72
72
  // NOTE: Don't pass around nodeId to other nodes, instead pass around NetworkLocation (which they
73
73
  // then turn into a nodeId, which they can then check permissions on themself).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.8.22",
3
+ "version": "0.8.23",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {