RspcTypescript apiTs rspc tauri
@rspc/tauri
TypeScript API reference for @rspc/tauri, version 0.0.0-main-4caedb14.
0.0.0-main-4caedb14
0.3.10.3.00.2.40.2.00.0.0-main-b8b35d280.0.0-main-45466c860.0.0-main-9452a4610.0.0-main-a5d698cd0.0.0-main-5a7531300.0.0-main-842dee871.0.0-rc.30.0.0-main-2e237f7b1.0.0-rc.20.0.0-main-50d5642f1.0.0-rc.10.0.0-main-52bdb3c10.0.0-main-bca3242b0.0.0-main-f10683d00.0.0-main-ee02fc570.0.0-main-6ed8cc980.0.0-main-9c15d2d40.0.0-main-799eec5d0.0.0-main-4caedb140.0.0-main-3c0947890.0.0-main-a312a5050.0.0-main-a2d5effc0.0.0-main-5d4b97910.0.0-main-cc3386190.0.0-main-333a38d40.0.0-main-f9ac6b780.0.0-main-7cdd90da0.1.30.0.0-main-32fe3d8a0.0.0-main-7c0a67c10.1.20.1.10.1.00.0.70.0.6
Generated from the published type declarations for this exact release.
Public exports of @rspc/tauri at version 0.0.0-main-4caedb14.
This page documents 0.0.0-main-4caedb14. The documented version is 0.3.1.
Classes
TauriTransport
declare class TauriTransport implements Transport {
private requestMap;
private listener?;
clientSubscriptionCallback?: (id: string, value: any) => void;
constructor();
doRequest(operation: OperationType, key: string, input: any): Promise<any>;
}
// Referenced local context (not public exports):
interface Transport {
clientSubscriptionCallback?: (id: string, key: string, value: any) => void;
doRequest(operation: OperationType, key: string, input: any): Promise<any>;
}
type OperationType = "query" | "mutation" | "subscription" | "subscriptionStop";
Functions
v2:tauriLink
/**
* Link for the rspc Tauri plugin
*/
declare function tauriLink(): Link;
// Referenced local context (not public exports):
/**
* TODO
*
* @internal
*/
type Link = (p: LinkOperation) => LinkResult;
/**
* The argument to a link. Contains information about the current operation and a function to call the next link.
*
* @internal
*/
interface LinkOperation {
op: Operation;
next(op: {
op: Operation;
}): LinkResult;
}
/**
* TODO
*
* @internal
*/
type LinkResult = {
exec: (resolve: (result: any) => void, reject: (error: Error | AlphaRSPCError) => void) => void;
abort: () => void;
};
/**
* TODO
*
* @internal
*/
interface Operation {
id: string;
type: "query" | "mutation" | "subscription" | "subscriptionStop";
input: unknown;
path: string;
context: OperationContext;
}
declare class AlphaRSPCError extends Error {
code: number;
message: string;
constructor(code: number, message: string);
}
/**
// … truncated, see the source link
Link for the rspc Tauri plugin
