Skip to content

Commit

Permalink
Export useful types for end-users (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaulz authored and sindresorhus committed Sep 23, 2019
1 parent ce8e15b commit afe3081
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,38 @@ export default got;
// For CommonJS default export support
module.exports = got;
module.exports.default = got;

// Export types
export * from './utils/types';
export {
Got,
GotStream,
ReturnResponse,
ReturnStream,
GotReturn
} from './create';
export {
ProxyStream as ResponseStream
} from './as-stream';
export {
GotError,
CacheError,
RequestError,
ParseError,
HTTPError,
MaxRedirectsError,
UnsupportedProtocolError,
TimeoutError,
CancelError
} from './errors';
export {
InitHook,
BeforeRequestHook,
BeforeRedirectHook,
BeforeRetryHook,
BeforeErrorHook,
AfterResponseHook,
HookType,
Hooks,
HookEvent
} from './known-hook-events';

0 comments on commit afe3081

Please sign in to comment.