File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -21,28 +21,25 @@ interface PostgrestResponseBase {
21
21
status : number
22
22
statusText : string
23
23
}
24
-
25
- interface PostgrestResponseSuccess < T > extends PostgrestResponseBase {
24
+ interface PostgrestSingleResponseSuccess < T > extends PostgrestResponseBase {
26
25
error : null
27
- data : T [ ]
26
+ data : T
28
27
count : number | null
29
28
}
30
29
interface PostgrestResponseFailure extends PostgrestResponseBase {
31
30
error : PostgrestError
32
31
data : null
33
32
count : null
34
33
}
35
- export type PostgrestResponse < T > = PostgrestResponseSuccess < T > | PostgrestResponseFailure
36
34
37
- interface PostgrestSingleResponseSuccess < T > extends PostgrestResponseBase {
38
- error : null
39
- data : T
40
- count : number | null
41
- }
35
+ // TODO: in v3:
36
+ // - remove PostgrestResponse and PostgrestMaybeSingleResponse
37
+ // - rename PostgrestSingleResponse to PostgrestResponse
42
38
export type PostgrestSingleResponse < T > =
43
39
| PostgrestSingleResponseSuccess < T >
44
40
| PostgrestResponseFailure
45
41
export type PostgrestMaybeSingleResponse < T > = PostgrestSingleResponse < T | null >
42
+ export type PostgrestResponse < T > = PostgrestSingleResponse < T [ ] >
46
43
47
44
export type GenericTable = {
48
45
Row : Record < string , unknown >
You can’t perform that action at this time.
0 commit comments