Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 5ec9dba

Browse files
authored
chore: use Omit instead of OmitUnion (#106)
Since the `JsonRpcRequest` type is no longer an union, we can use `Omit` from the standard library.
1 parent 32d9b02 commit 5ec9dba

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/KeyringClient.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
} from './internal/api';
2626
import type { JsonRpcRequest } from './JsonRpcRequest';
2727
import { KeyringRpcMethod } from './rpc-handler';
28-
import type { OmitUnion } from './utils';
2928
import { strictMask } from './utils';
3029

3130
export type Sender = {
@@ -50,9 +49,7 @@ export class KeyringClient implements Keyring {
5049
* @param partial - A partial JSON-RPC request (method and params).
5150
* @returns A promise that resolves to the response to the request.
5251
*/
53-
async #send(
54-
partial: OmitUnion<JsonRpcRequest, 'jsonrpc' | 'id'>,
55-
): Promise<Json> {
52+
async #send(partial: Omit<JsonRpcRequest, 'jsonrpc' | 'id'>): Promise<Json> {
5653
return this.#sender.send({
5754
jsonrpc: '2.0',
5855
id: uuid(),

0 commit comments

Comments
 (0)