[go: up one dir, main page]

Skip to content

v2.0.0: Upgrade to TypeScript 3.2 and fix protocol types (#9)

Latest
Compare
Choose a tag to compare
@corhere corhere released this 13 Dec 21:49
· 27 commits to master since this release
96483e9
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.