Skip to content

Commit e45140b

Browse files
committed
Fix: BaseRemoteCommandChannel should have command as generic
1 parent c69d616 commit e45140b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

MessageRelay/Channel.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,22 @@ export abstract class BaseLocalResponseChannel<R extends endpoint.Response, Tx e
6666
}
6767

6868
export abstract class BaseRemoteCommandChannel<
69+
C extends endpoint.Command<S, A>,
6970
S extends saga.SagaSession,
7071
A extends endpoint.CommandArguments,
7172
Tx extends TxContext,
7273
>
73-
extends endpoint.AbstractChannel<endpoint.Command<S, A>>
74-
implements ChannelFromMessageRelay<endpoint.Command<S, A>, Tx>
74+
extends endpoint.AbstractChannel<C>
75+
implements ChannelFromMessageRelay<C, Tx>
7576
{
76-
private _repository: endpoint.CommandRepository<endpoint.Command<S, A>, Tx>;
77+
private _repository: endpoint.CommandRepository<C, Tx>;
7778

78-
constructor(repository: endpoint.CommandRepository<endpoint.Command<S, A>, Tx>) {
79+
constructor(repository: endpoint.CommandRepository<C, Tx>) {
7980
super();
8081
this._repository = repository;
8182
}
8283

83-
getRepository(): endpoint.CommandRepository<endpoint.Command<S, A>, Tx> {
84+
getRepository(): endpoint.CommandRepository<C, Tx> {
8485
return this._repository;
8586
}
8687
}

0 commit comments

Comments
 (0)