Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/core/supabase-js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ export {
} from '@supabase/functions-js'
export * from '@supabase/realtime-js'
export { default as SupabaseClient } from './SupabaseClient'
export type { SupabaseClientOptions, QueryResult, QueryData, QueryError } from './lib/types'
export type {
SupabaseClientOptions,
QueryResult,
QueryData,
QueryError,
DatabaseWithoutInternals,
} from './lib/types'

/**
* Creates a new Supabase Client.
Expand Down
6 changes: 6 additions & 0 deletions packages/core/supabase-js/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@ export type SupabaseClientOptions<SchemaName> = {
export type QueryResult<T> = T extends PromiseLike<infer U> ? U : never
export type QueryData<T> = T extends PromiseLike<{ data: infer U }> ? Exclude<U, null> : never
export type QueryError = PostgrestError

/**
* Strips internal Supabase metadata from Database types.
* Useful for libraries defining generic constraints on Database types.
*/
export type DatabaseWithoutInternals<DB> = Omit<DB, '__InternalSupabase'>
Loading