File tree 3 files changed +7
-10
lines changed
3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ abstract class ClientHandler<
8
8
Input extends JSONValue = JSONValue ,
9
9
Output extends JSONValue = JSONValue ,
10
10
> extends Handler < Container , Input , Output > {
11
- public handle = async function * (
11
+ public handle = async (
12
12
input : AsyncIterableIterator < Input > ,
13
13
cancel : ( reason ?: any ) => void ,
14
14
meta : Record < string , JSONValue > | undefined ,
15
15
ctx : ContextTimed ,
16
- ) : AsyncIterableIterator < Output > {
16
+ ) : Promise < Output > = > {
17
17
throw new ErrorRPCMethodNotImplemented ( ) ;
18
18
} ;
19
19
}
Original file line number Diff line number Diff line change @@ -6,16 +6,13 @@ import { ErrorRPCMethodNotImplemented } from '../errors';
6
6
7
7
abstract class RawHandler <
8
8
Container extends ContainerType = ContainerType ,
9
- Input extends JSONValue = JSONValue , // Define Input type if needed
10
- Output extends JSONValue = JSONValue , // Define Output type if needed
11
9
> extends Handler < Container > {
12
- public handle = async function * (
13
- input : AsyncIterableIterator < Input > , // Change this based on your specific needs
10
+ public handle = async (
11
+ input : [ JSONRPCRequest , ReadableStream < Uint8Array > ] ,
14
12
cancel : ( reason ?: any ) => void ,
15
13
meta : Record < string , JSONValue > | undefined ,
16
14
ctx : ContextTimed ,
17
- ) : AsyncIterableIterator < Output > {
18
- // Change return type to AsyncIterableIterator
15
+ ) : Promise < [ JSONValue , ReadableStream < Uint8Array > ] > => {
19
16
throw new ErrorRPCMethodNotImplemented ( 'This method must be overridden' ) ;
20
17
} ;
21
18
}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ abstract class UnaryHandler<
8
8
Input extends JSONValue = JSONValue ,
9
9
Output extends JSONValue = JSONValue ,
10
10
> extends Handler < Container , Input , Output > {
11
- public handle = async function * (
11
+ public handle = async (
12
12
input : Input ,
13
13
cancel : ( reason ?: any ) => void ,
14
14
meta : Record < string , JSONValue > | undefined ,
15
15
ctx : ContextTimed ,
16
- ) : AsyncIterableIterator < Output > {
16
+ ) : Promise < Output > = > {
17
17
throw new ErrorRPCMethodNotImplemented ( 'This method must be overridden' ) ;
18
18
} ;
19
19
}
You can’t perform that action at this time.
0 commit comments