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

Commit

Permalink
chore: use Omit instead of OmitUnion (#106)
Browse files Browse the repository at this point in the history
Since the `JsonRpcRequest` type is no longer an union, we can use `Omit`
from the standard library.
  • Loading branch information
danroc authored Sep 11, 2023
1 parent 32d9b02 commit 5ec9dba
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/KeyringClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
} from './internal/api';
import type { JsonRpcRequest } from './JsonRpcRequest';
import { KeyringRpcMethod } from './rpc-handler';
import type { OmitUnion } from './utils';
import { strictMask } from './utils';

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

0 comments on commit 5ec9dba

Please sign in to comment.