Skip to content
Discussion options

You must be logged in to vote

Awesome. This lib almost like magic. Minor correction I thing. Looks like there is no direct way to get the callable map. Type of LoginErrorMap is

type LoginErrorMap = Omit<Record<never, never>, keyof U> & {
    BAD_REQUEST: {
        message: string;
    };
}

But Wrapping it around ORPCErrorConstructorMap worked

type LoginErrorMap = InferContractRouterErrorMap<typeof login>
type LoginErrorsType = ORPCErrorConstructorMap<LoginErrorMap>

Replies: 4 comments 4 replies

Comment options

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

Answer selected by s1n7ax
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@unnoq
Comment options

unnoq Sep 7, 2025
Maintainer

@maelp
Comment options

@unnoq
Comment options

unnoq Sep 7, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants