Skip to content

Commit ab145cb

Browse files
chore: use type from package and remove the duplicated type
1 parent bf91dc1 commit ab145cb

File tree

1 file changed

+1
-3
lines changed
  • packages/blockchain-link/src/workers/electrum

1 file changed

+1
-3
lines changed

packages/blockchain-link/src/workers/electrum/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'
22
import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants';
33
import type { Response } from '@trezor/blockchain-link-types';
44
import { Message } from '@trezor/blockchain-link-types/src/messages';
5+
import { Without } from '@trezor/type-utils';
56

67
import { BaseWorker, CONTEXT, ContextType } from '../baseWorker';
78
import * as M from './methods';
@@ -13,9 +14,6 @@ import type { ElectrumClient } from './client/electrum';
1314
type BlockListener = ReturnType<typeof L.blockListener>;
1415
type TxListener = ReturnType<typeof L.txListener>;
1516

16-
// reason:
17-
// https://stackoverflow.com/questions/57103834/typescript-omit-a-property-from-all-interfaces-in-a-union-but-keep-the-union-s#answer-57103940
18-
type Without<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
1917
type Request<T> = T extends any
2018
? T & ContextType<ElectrumClient> & { blockListener: BlockListener; txListener: TxListener }
2119
: never;

0 commit comments

Comments
 (0)