(d,f,g)=> 🥁
05/30/2022, 11:40 PMjs
const { data } = await supabase.rpc<Record<string, number>>('comments_stats')
data here is Record<string, number>[] | null
Needle
05/30/2022, 11:40 PMNeedle
05/30/2022, 11:40 PM(d,f,g)=> 🥁
05/30/2022, 11:46 PMreturn data as unknown as Record<string, number>
but it would be ideal not to enforce that an rpc call always returns an arrayNeedle
05/31/2022, 11:55 PMNeedle
05/31/2022, 11:56 PM