-
-
Notifications
You must be signed in to change notification settings - Fork 403
Closed
Labels
Description
Bug report
Describe the bug
Incorrect types for match
filter. It should accept any types of values
https://supabase.io/docs/reference/javascript/match
To Reproduce
Add this code to a typescript file and it'll generate error at line 4 saying
Type 'number' is not assignable to type 'string'
const { data, error } = await supabase
.from('cities')
.select('name, country_id')
.match({name: 'Beijing', country_id: 156})
I should change the values to string inorder to get rid of the errors
const { data, error } = await supabase
.from('cities')
.select('name, country_id')
.match({name: 'Beijing', country_id: '156'}) <----------
Expected behavior
It shouldn't throw any type error when passing types other than string
Screenshots
Also, I'm importing types form '@supabase/postgrest-js'
. @supabase/supabase-js
doesn't have any exported types.
import { PostgrestFilterBuilder } from '@supabase/postgrest-js';
System information
- "typescript": "^4.3.2"
- "@supabase/supabase-js": "^1.14.0",