Skip to content

How to export named interface in generated bindings.ts #119

Discussion options

You must be logged in to vote

You shouldn't be relying on the format of the rspc bindings because they may change between releases. I need to mention this more in the documentation. You can do something like this in your code.

import { inferProcedureResult } from "@rspc/client";
import { Procedures } from "./my-bindings-from-rust.ts";

export type User = inferProcedureResult<Procedures, "query", "me">;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oscartbeaumont
Comment options

Answer selected by ofofofofo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants