got icon indicating copy to clipboard operation
got copied to clipboard

Bug: `createRetryStream` is not a function

Open titanism opened this issue 1 year ago • 0 comments

Describe the bug

  • Node.js version: v16.18.1
  • OS & version: macOS

The Stream API documentation suggests that a third argument of createRetryStream is available for retry streams at https://github.com/sindresorhus/got/blob/39273481b67be41207c4efc31fc36e289eb53c88/documentation/3-streams.md#createretrystream. Also see https://github.com/sindresorhus/got/blob/3e82b500bc1bcf40ec5b56d295142f5a941f6a6e/source/as-promise/index.ts#L137-L154.

Related to https://github.com/sindresorhus/got/issues/1691 – and possible also https://github.com/sindresorhus/got/issues/2073, https://github.com/sindresorhus/got/issues/1691, and https://github.com/sindresorhus/got/issues/1852.

Actual behavior

The documentation suggests this third argument exists, but it does not and usage of it results in the error createRetryStream is not a function.

Expected behavior

It should function as documented, merging options passed, e.g. createRetryStream({ url: 'https://some-new-url.com' });.

Checklist

  • [x] I have read the documentation.
  • [x] I have tried my code with the latest version of Node.js and Got.

titanism avatar Feb 21 '23 03:02 titanism