Releases: Fitbit/jsonrpc-ts
Releases · Fitbit/jsonrpc-ts
v2.0.0: Upgrade to TypeScript 3.2 and fix protocol types (#9)
TypeScript 3.2 brings typed `Function.call`, which has revealed a deficiency in our JSON-RPC type definitions. The `params` argument for the `RequestHandler` and `NotificationHandler` callbacks was incompatible with `undefined` in its union, even though an incoming RPC request could have its `params` property omitted. Correct this mistake by including `undefined` in the `RPCParams` union type. Finish fixing #5 by also allowing `params` to be omitted for notifications. Fix the unit tests which did not catch this issue before.