Skip to content

Commit e7b35e9

Browse files
committed
chore: add test for selecting on an rpc call
1 parent 05419fb commit e7b35e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/select-query-parser/rpc.test-d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ import { TypeEqual } from 'ts-expect'
1010
let expected: Database['public']['Functions']['get_username_and_status']['Returns'][number]
1111
expectType<TypeEqual<typeof result, typeof expected>>(true)
1212
}
13+
14+
// select on an rpc call
15+
{
16+
const { data, error } = await postgrest.rpc('get_username_and_status').select('username')
17+
if (error) throw error
18+
expectType<{ username: string }[]>(data)
19+
}

0 commit comments

Comments
 (0)