the-forest/client/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/RpcProcedure.d.ts
2024-09-17 20:35:18 -04:00

6 lines
405 B
TypeScript

interface RpcProcedure<TPayload = unknown, TResult = unknown> extends String {
}
declare type RpcProcedurePayload<TProcedure> = TProcedure extends RpcProcedure<infer TPayload, infer TResult> ? TPayload : never;
declare type RpcProcedureResult<TProcedure> = TProcedure extends RpcProcedure<infer TPayload, infer TResult> ? TResult : never;
export { RpcProcedure, RpcProcedurePayload, RpcProcedureResult };