Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Conversation

@Hexxeh
Copy link
Contributor

@Hexxeh Hexxeh commented Nov 19, 2018

Also update dependencies and fix lint error whilst I'm here

Also update dependencies and fix lint error whilst I'm here Signed-off-by: Liam McLoughlin <lmcloughlin@fitbit.com>
@Hexxeh Hexxeh requested a review from a team November 19, 2018 12:33
@Hexxeh Hexxeh merged commit 6ef57a4 into master Nov 19, 2018
@Hexxeh Hexxeh deleted the bugfix/optionalparams branch November 19, 2018 17:15
corhere added a commit that referenced this pull request Dec 13, 2018
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.
corhere added a commit that referenced this pull request Dec 13, 2018
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants