Skip to content

Commit fec2c30

Browse files
committed
export the new error class
1 parent f90ac3e commit fec2c30

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
export const ReactNativeBlobUtil: ReactNativeBlobUtilStatic;
77
export type ReactNativeBlobUtil = ReactNativeBlobUtilStatic;
88
export default ReactNativeBlobUtil;
9-
import {filedescriptor} from './types';
9+
import CanceledFetchError from './class/ReactNativeBlobUtilCancelError'
10+
import { filedescriptor } from './types';
1011

1112
interface ReactNativeBlobUtilStatic {
1213
fetch(method: Methods, url: string, headers?: { [key: string]: string }, body?: any
@@ -29,6 +30,7 @@ interface ReactNativeBlobUtilStatic {
2930
polyfill: Polyfill;
3031
// this require external module https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/oboe
3132
JSONStream: any;
33+
CanceledFetchError: CanceledFetchError
3234
}
3335

3436
export interface Polyfill {

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import ios from './ios';
1515
import JSONStream from './json-stream';
1616
import {config, fetch} from './fetch';
1717
import URIUtil from "./utils/uri";
18+
import { CanceledFetchError } from ".class/ReactNativeBlobUtilCanceledFetchError";
1819

1920
const {
2021
ReactNativeBlobUtilSession,
@@ -70,5 +71,6 @@ export default {
7071
wrap,
7172
polyfill,
7273
JSONStream,
73-
MediaCollection
74+
MediaCollection,
75+
CanceledFetchError
7476
};

0 commit comments

Comments
 (0)