JSONRPCParams typing issue
See original GitHub issueShould probably be:
export type JSONRPCParams = any | any[];
Or just:
export type JSONRPCParams = any;
Or you will get errors from TypeScript while trying to destructure params or to type it as object is akin to {}, an object with no known props.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
JSON-RPC over HTTP
Since JSON-RPC uses JSON, it shares the same type system as JSON (see http://www.json.org or RFC 4627). Whenever this document refers to any...
Read more >params field could be a restricted JSON schema instead of ...
To solve all these issues I would propose to replace the OpenRPC params field by a restricted JSON schema. Restricted means "limited to...
Read more >JSON RPC API - Solana Docs
To make a JSON-RPC request, send an HTTP POST request with a Content-Type: application/json header. The JSON request data should contain 4 fields:...
Read more >Processing JSON-RPC 2.0 request parameters
The new utility classes solve three common issues that occur when processing request parameters: Provide type correct retrieval of the JSON ...
Read more >jsonrpc2 - Go Packages
JSON-RPC 2.0 support positional and named parameters. Which one should be used when calling server's method depends on type of that method's ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Adding
"strictFunctionTypes": truetotsconfig.jsonsurfaces this error. In your example,"extends": "@tsconfig/node16/tsconfig.json"inherits this setting.Let me think of something so that it works with
strictmode! Thank you for reporting.Try this: https://github.com/segevfiner/json-rpc-2.0-types-issue, just a
pnpm buildshould show the issue.