effect-aws
effect-aws copied to clipboard
AbortController
https://aws.amazon.com/blogs/developer/abortcontroller-in-modular-aws-sdk-for-javascript/
I think it must be easy to implement cancellation.
-- return (input: Input, options?: __HttpHandlerOptions) =>
++ return (input: Input, options?: Omit<__HttpHandlerOptions, 'abortSignal'>) =>
Effect.tryPromise({
-- try: () => client.send(new Command(input), options ?? {}),
++ try: (abortSignal) => client.send(new Command(input), {...options, abortSignal} ?? {abortSignal}),
catch: (e) => ...
})