Last active
May 5, 2025 11:10
-
-
Save mmikhan/672518b216d7e33cb4999ce88fb26b7d to your computer and use it in GitHub Desktop.
Infer the output type directly from the Better Auth API function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Infer the output type directly from the Better Auth API function | |
type ListUsersOutputType = Awaited<ReturnType<typeof auth.api.listUsers>>; | |
// Implementation | |
// Use z.custom for non-Zod types or refine further if needed | |
.output(z.custom<ListUsersOutputType>()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment