diff --git a/src/index.all.ts b/src/index.all.ts index b0e1c0d..1302bf9 100644 --- a/src/index.all.ts +++ b/src/index.all.ts @@ -1,6 +1,7 @@ import { setOptions, setErrorType, setPolyfills } from "./config.js" import { core } from "./core.js" import * as Addons from "./addons/index.js" +import { WretchError } from "./resolver.js" function factory(_url = "", _options = {}) { return { ...core, _url, _options } @@ -15,4 +16,6 @@ factory["default"] = factory factory.options = setOptions factory.errorType = setErrorType factory.polyfills = setPolyfills -export default factory \ No newline at end of file +factory.WretchError = WretchError + +export default factory diff --git a/src/index.ts b/src/index.ts index b4a3353..5d8e463 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import { setOptions, setErrorType, setPolyfills } from "./config.js" import { core } from "./core.js" +import { WretchError } from "./resolver.js" import type { Wretch } from "./types.js" export type { @@ -43,4 +44,7 @@ factory.options = setOptions factory.errorType = setErrorType /** {@inheritDoc setPolyfills} */ factory.polyfills = setPolyfills +/** {@inheritDoc WretchError } */ +factory.WretchError = WretchError + export default factory