Estuary-RPC at some points needs a type definition for your API, and at some points needs the metadata definition This type will extract the type definition with a generic closure (as client and server side type definitions use separate closures).
const myApiMetadata = { foo: get<number, number, SimpleMeta>("foo")};type MyApiTypeOf<Closure> = ApiTypeOf<typeof myApiMetadata>;const client = createApiClient(myApiMetadata) as MyApiTypeOf<ClientClosure>;
new Closure Type
The type of the metadata that is used to describe the endpoint. This should extend SimpleMeta, although for this code it is not strictly necessary
The type from which to extract the ApiType
Generated using TypeDoc
Estuary-RPC at some points needs a type definition for your API, and at some points needs the metadata definition This type will extract the type definition with a generic closure (as client and server side type definitions use separate closures).
Example