swarpc 0.17.0 → 0.17.2

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +6 -4
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -81,10 +81,12 @@ tools: {
81
81
  * {@includeCode ../example/src/lib/procedures.ts}
82
82
  */
83
83
  export type ProceduresMap = Record<string, Procedure<Schema, Schema, Schema>>;
84
- type ProcedureNameAndData<Procedures extends ProceduresMap, Key extends "progress" | "success", Name extends keyof Procedures = keyof Procedures> = {
85
- procedure: Name;
86
- data: Schema.InferOutput<Procedures[Name][Key]>;
87
- };
84
+ type ProcedureNameAndData<Procedures extends ProceduresMap, Key extends "progress" | "success"> = {
85
+ [K in keyof Procedures]: {
86
+ procedure: K;
87
+ data: Schema.InferOutput<Procedures[K][Key]>;
88
+ };
89
+ }[keyof Procedures];
88
90
  /**
89
91
  * Declaration of hooks to run on messages received from the server
90
92
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swarpc",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "Full type-safe RPC library for service worker -- move things off of the UI thread with ease!",
5
5
  "keywords": [
6
6
  "service-workers",