Skip to content

Commit 1ac11d7

Browse files
authoredMar 18, 2021
Merge pull request #445 from ludwigschubi/master
Export fetcher interfaces
2 parents 546502b + 0f16a5f commit 1ac11d7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
 

‎src/fetcher.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ const getNS = (factory?: RdfJsDataFactory) => {
9292
}
9393
const ns = getNS()
9494

95-
interface FetchError extends Error {
95+
export interface FetchError extends Error {
9696
statusText?: string
9797
status?: StatusValues
9898
response?: ExtendedResponse
9999
}
100100

101101
/** An extended interface of Response, since RDFlib.js adds some properties. */
102-
interface ExtendedResponse extends Response {
102+
export interface ExtendedResponse extends Response {
103103
/** String representation of the Body */
104104
responseText?: string
105105
/** Identifier of the reqest */
@@ -134,7 +134,7 @@ type HTTPMethods = 'GET' | 'PUT' | 'POST' | 'PATCH' | 'HEAD' | 'DELETE' | 'CONNE
134134
type Options = Partial<AutoInitOptions>
135135

136136
/** Initiated by initFetchOptions, which runs on load */
137-
interface AutoInitOptions extends RequestInit{
137+
export interface AutoInitOptions extends RequestInit{
138138
/** The used Fetch function */
139139
fetch?: Fetch
140140
/**

‎src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import BlankNode from './blank-node'
44
import Collection from './collection'
55
import * as convert from './convert'
66
import Empty from './empty'
7-
import Fetcher from './fetcher'
7+
import Fetcher, { AutoInitOptions, ExtendedResponse, FetchError } from './fetcher'
88
import Formula from './formula'
99
import Store from './store'
1010
import jsonParser from './jsonparser'
@@ -69,6 +69,9 @@ export {
6969
DataFactory,
7070
Empty,
7171
Fetcher,
72+
AutoInitOptions,
73+
ExtendedResponse,
74+
FetchError,
7275
Formula,
7376
Store,
7477
jsonParser,

0 commit comments

Comments
 (0)
Please sign in to comment.