Skip to content

ci: merge staging to master #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@matrixai/rpc",
"version": "0.1.5",
"version": "0.1.6",
"author": "Matrix AI",
"contributors": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/ClientHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ abstract class ClientHandler<
Input extends JSONValue = JSONValue,
Output extends JSONValue = JSONValue,
> extends Handler<Container, Input, Output> {
public handle = async function* (
public handle = async (
input: AsyncIterableIterator<Input>,
cancel: (reason?: any) => void,
meta: Record<string, JSONValue> | undefined,
ctx: ContextTimed,
): AsyncIterableIterator<Output> {
): Promise<Output> => {
throw new ErrorRPCMethodNotImplemented();
};
}
Expand Down
9 changes: 3 additions & 6 deletions src/handlers/RawHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import { ErrorRPCMethodNotImplemented } from '../errors';

abstract class RawHandler<
Container extends ContainerType = ContainerType,
Input extends JSONValue = JSONValue, // Define Input type if needed
Output extends JSONValue = JSONValue, // Define Output type if needed
> extends Handler<Container> {
public handle = async function* (
input: AsyncIterableIterator<Input>, // Change this based on your specific needs
public handle = async (
input: [JSONRPCRequest, ReadableStream<Uint8Array>],
cancel: (reason?: any) => void,
meta: Record<string, JSONValue> | undefined,
ctx: ContextTimed,
): AsyncIterableIterator<Output> {
// Change return type to AsyncIterableIterator
): Promise<[JSONValue, ReadableStream<Uint8Array>]> => {
throw new ErrorRPCMethodNotImplemented('This method must be overridden');
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/UnaryHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ abstract class UnaryHandler<
Input extends JSONValue = JSONValue,
Output extends JSONValue = JSONValue,
> extends Handler<Container, Input, Output> {
public handle = async function* (
public handle = async (
input: Input,
cancel: (reason?: any) => void,
meta: Record<string, JSONValue> | undefined,
ctx: ContextTimed,
): AsyncIterableIterator<Output> {
): Promise<Output> => {
throw new ErrorRPCMethodNotImplemented('This method must be overridden');
};
}
Expand Down