Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

RpcOperation

interfaz

Declaración de tipos de un procedimiento RPC: su entrada y su salida.

ts
import type { RpcOperation } from "@meekojs/meeko/framework";

Source code src/shared/clients.ts:136

Declaración #

ts
interface RpcOperation<Input = unknown, Output = unknown> {
	readonly input: Input
	readonly output: Output
}

Type parameters #

Input = unknown
Output = unknown

Example #

ts
import { createRpcClient } from "@meekojs/meeko/framework";
import type { RpcOperation } from "@meekojs/meeko/framework";

type Contract = { "users.get": RpcOperation<{ id: string }, { id: string; name: string }> };
const rpc = createRpcClient<Contract>({ rpc: [{ id: "users.get", pathname: "/_meeko/rpc/users/get" }] });
const user = await rpc.users.get({ id: "123" });

Propiedades #

input #

propiedad sólo lectura

readonly input: Input

Entrada del procedimiento.

output #

propiedad sólo lectura

readonly output: Output

Salida del procedimiento.

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/shared/clients.ts