This repository was archived by the owner on Sep 11, 2026. It is now read-only.
3.0.0
Added
Changed
- BREAKING: Improve types and type validation (#19)
- Various type changes have been made that might be breaking:
- The
JsonRpcRequestandJsonRpcNotificationtypes now include a generic constraint requiring that theParamstype extends theJsonRpcParamstype. - The
JsonRpcSuccessandJsonRpcResponsetypes now include a generic contraint for theResulttype, requiring that it extends theJsontype. - Various validation functions now accept
unknownparameters rather than specific types. This should not be breaking except that it may affect type inference for the parameters passed in.
- The
- New JSON-related functions have been added:
assertIsJsonRpcResponseisJsonRpcResponseInferWithParamsJsonRpcParams
- New JSON Struct types have been added:
JsonRpcErrorStructJsonRpcFailureStructJsonRpcIdStructJsonRpcParamsStructJsonRpcRequestStructJsonRpcResponseStructJsonRpcSuccessStructJsonRpcVersionStructJsonStruct
- Various type changes have been made that might be breaking: