Taner Nill
02/24/2022, 4:18 PMScott P
02/24/2022, 4:18 PMAuthProvider
from?Scott P
02/24/2022, 4:19 PMTaner Nill
02/24/2022, 4:21 PMTaner Nill
02/24/2022, 4:22 PMScott P
02/24/2022, 4:23 PM<AuthProvider>
, since you're already passing them in at the parent levelTaner Nill
02/24/2022, 4:24 PMTaner Nill
02/24/2022, 4:24 PMScott P
02/24/2022, 4:26 PMScott P
02/24/2022, 4:26 PM<SupabaseWrapper>
at my App.tsx
without any propsTaner Nill
02/24/2022, 4:29 PMScott P
02/24/2022, 4:36 PMFC
definition (which isn't Supabase specific) and adding AsyncStorage as any
(which was a workaround to stop TS complaining at the time I wrote this code).
The main difference is that you can add types to queries which will tell it what the returned data looks like:
ts
interface ISomeDataStructure {
image_url: string;
created_at: Date;
}
SupabaseClient
.from<ISomeDataStructure>("my_table")
.select("image_url, created_at")
By adding <ISomeDataStructure>
after .from
, VSCode will be able to tell you what properties are available in your data.
Everything else is just JS.