Skip to content

Commit db3a70b

Browse files
committed
feat: export error and response types
1 parent 5ddecaf commit db3a70b

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
import PostgrestClient from './PostgrestClient'
22
import PostgrestFilterBuilder from './lib/PostgrestFilterBuilder'
33
import PostgrestQueryBuilder from './lib/PostgrestQueryBuilder'
4-
import { PostgrestBuilder } from './lib/types'
4+
import {
5+
PostgrestBuilder,
6+
PostgrestResponse,
7+
PostgrestSingleResponse,
8+
PostgrestMaybeSingleResponse,
9+
PostgrestError,
10+
} from './lib/types'
511

6-
export { PostgrestClient, PostgrestFilterBuilder, PostgrestQueryBuilder, PostgrestBuilder }
12+
export {
13+
PostgrestClient,
14+
PostgrestBuilder,
15+
PostgrestQueryBuilder,
16+
PostgrestFilterBuilder,
17+
PostgrestResponse,
18+
PostgrestSingleResponse,
19+
PostgrestMaybeSingleResponse,
20+
PostgrestError,
21+
}

packages/core/postgrest-js/src/lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fetch from 'cross-fetch'
55
*
66
* {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
77
*/
8-
type PostgrestError = {
8+
export type PostgrestError = {
99
message: string
1010
details: string
1111
hint: string

0 commit comments

Comments
 (0)