Skip to content
Merged
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
19 changes: 6 additions & 13 deletions src/SupabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default class SupabaseClient<
*
* @param relation - The table or view name to query
*/
from: PostgrestClient<Database, SchemaName>['from'] = (relation: string) => {
from(relation: string) {
return this.rest.from(relation)
}

Expand All @@ -142,11 +142,7 @@ export default class SupabaseClient<
*
* @param schema - The name of the schema to query
*/
schema: PostgrestClient<Database, SchemaName>['schema'] = <
DynamicSchema extends string & keyof Database
>(
schema: DynamicSchema
) => {
schema<DynamicSchema extends string & keyof Database>(schema: DynamicSchema) {
return this.rest.schema<DynamicSchema>(schema)
}

Expand All @@ -171,17 +167,14 @@ export default class SupabaseClient<
* `"estimated"`: Uses exact count for low numbers and planned count for high
* numbers.
*/
rpc: PostgrestClient<Database, SchemaName>['rpc'] = <
FunctionName extends string & keyof Schema['Functions'],
Function_ extends Schema['Functions'][FunctionName]
>(
fn: FunctionName,
args: Function_['Args'] = {},
rpc<FnName extends string & keyof Schema['Functions'], Fn extends Schema['Functions'][FnName]>(
fn: FnName,
args: Fn['Args'] = {},
options?: {
head?: boolean
count?: 'exact' | 'planned' | 'estimated'
}
) => {
) {
return this.rest.rpc(fn, args, options)
}

Expand Down