File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,9 @@ export default class PostgrestClient<
121
121
* `"estimated"`: Uses exact count for low numbers and planned count for high
122
122
* numbers.
123
123
*/
124
- rpc <
125
- FunctionName extends string & keyof Schema [ 'Functions' ] ,
126
- Function_ extends Schema [ 'Functions' ] [ FunctionName ]
127
- > (
128
- fn : FunctionName ,
129
- args : Function_ [ 'Args' ] = { } ,
124
+ rpc < FnName extends string & keyof Schema [ 'Functions' ] , Fn extends Schema [ 'Functions' ] [ FnName ] > (
125
+ fn : FnName ,
126
+ args : Fn [ 'Args' ] = { } ,
130
127
{
131
128
head = false ,
132
129
get = false ,
@@ -138,12 +135,12 @@ export default class PostgrestClient<
138
135
} = { }
139
136
) : PostgrestFilterBuilder <
140
137
Schema ,
141
- Function_ [ 'Returns' ] extends any [ ]
142
- ? Function_ [ 'Returns' ] [ number ] extends Record < string , unknown >
143
- ? Function_ [ 'Returns' ] [ number ]
138
+ Fn [ 'Returns' ] extends any [ ]
139
+ ? Fn [ 'Returns' ] [ number ] extends Record < string , unknown >
140
+ ? Fn [ 'Returns' ] [ number ]
144
141
: never
145
142
: never ,
146
- Function_ [ 'Returns' ]
143
+ Fn [ 'Returns' ]
147
144
> {
148
145
let method : 'HEAD' | 'GET' | 'POST'
149
146
const url = new URL ( `${ this . url } /rpc/${ fn } ` )
@@ -180,6 +177,6 @@ export default class PostgrestClient<
180
177
body,
181
178
fetch : this . fetch ,
182
179
allowEmpty : false ,
183
- } as unknown as PostgrestBuilder < Function_ [ 'Returns' ] > )
180
+ } as unknown as PostgrestBuilder < Fn [ 'Returns' ] > )
184
181
}
185
182
}
You can’t perform that action at this time.
0 commit comments