diff --git a/packages/abort-controller/src/AbortController.ts b/packages/abort-controller/src/AbortController.ts index fbfc7cccf542..23c70fb4785c 100644 --- a/packages/abort-controller/src/AbortController.ts +++ b/packages/abort-controller/src/AbortController.ts @@ -2,9 +2,13 @@ import { AbortController as IAbortController } from "@aws-sdk/types"; import { AbortSignal } from "./AbortSignal"; +export { IAbortController }; + /** * This implementation was added as Node.js didn't support AbortController prior to 15.x - * Use native implementation in browsers or Node.js >=15.4.0. + * Use native implementation in browsers or Node.js \>=15.4.0. + * + * @public */ export class AbortController implements IAbortController { public readonly signal: AbortSignal = new AbortSignal(); diff --git a/packages/abort-controller/src/AbortSignal.ts b/packages/abort-controller/src/AbortSignal.ts index 1da2c3386b23..278438e93588 100644 --- a/packages/abort-controller/src/AbortSignal.ts +++ b/packages/abort-controller/src/AbortSignal.ts @@ -1,5 +1,10 @@ import { AbortHandler, AbortSignal as IAbortSignal } from "@aws-sdk/types"; +export { AbortHandler, IAbortSignal }; + +/** + * @public + */ export class AbortSignal implements IAbortSignal { public onabort: AbortHandler | null = null; private _aborted = false; diff --git a/packages/abort-controller/src/index.ts b/packages/abort-controller/src/index.ts index a0f47f72834e..8788e2f1af78 100644 --- a/packages/abort-controller/src/index.ts +++ b/packages/abort-controller/src/index.ts @@ -1,2 +1,9 @@ +/** + * This implementation was added as Node.js didn't support AbortController prior to 15.x + * Use native implementation in browsers or Node.js \>=15.4.0. + * + * @deprecated Use standard implementations in [Browsers](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and [Node.js](https://nodejs.org/docs/latest/api/globals.html#class-abortcontroller) + * @packageDocumentation + */ export * from "./AbortController"; export * from "./AbortSignal";