Bug report
Describe the bug
awaiting a query with .throwOnError() correctly eliminates null from the typing. However, if you don't await it and use .then(...) instead, then null is not eliminated from the typing.
To Reproduce
supabase.from('users').select('id').eq('id', id).single().throwOnError().then(({ data }) => { ... });
Expected behavior
Type of data should be { id: string }
Actual behavior
Type of data is { id: string } | null
Bug report
Describe the bug
awaiting a query with
.throwOnError()correctly eliminatesnullfrom the typing. However, if you don't await it and use.then(...)instead, thennullis not eliminated from the typing.To Reproduce
Expected behavior
Type of
datashould be{ id: string }Actual behavior
Type of
datais{ id: string } | null