© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2w ago
vitekma6

RPC call return type in TypeScript not nullable

PostgREST🟡javascript
I wrote a function that basically performs a look up for a specific row. It returns an id or null. The return type of the function is bigint which can contain null. However when I export TypeScript types the return type is
number
number
. I would assume that the correct return type is
number | null
number | null
. Do you know why's that? Wouldn't it be better and more typesafe to include the
null
null
in the return type?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RPC function return type is unknown
SupabaseSSupabase / help-and-questions
4y ago
Best way to specify type for rpc call response data in TypeScript?
SupabaseSSupabase / help-and-questions
4y ago
Typescript return type for Functions
SupabaseSSupabase / help-and-questions
4y ago
Supabase RPC functions return type shows a 2D array?
SupabaseSSupabase / help-and-questions
4y ago