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

Conversation

@corhere
Copy link
Contributor

@corhere corhere commented 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.

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 corhere requested a review from a team December 13, 2018 19:31
@corhere corhere merged commit 96483e9 into master Dec 13, 2018
@corhere corhere deleted the typescript-3.2 branch December 13, 2018 19:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants