Closed superlc closed 2 years ago
I have read the source code. The code of the href you gave is correct, but when I import { RetryError } from 'got', It shows that I was so confused.
I have no problem with source code. If you read dist code carefully, you could find it out that no RetryError in types file.
The exported types.d.ts
file is not used as the types
entry in package.json
, it's just a helper. Because it's defined in the source code, it's also exported here:
https://cdn.jsdelivr.net/npm/got@12.0.0-beta.4/dist/source/core/errors.d.ts
export declare class RetryError extends RequestError {
which is imported by https://cdn.jsdelivr.net/npm/got@12.0.0-beta.4/dist/source/index.d.ts
Can you set up a repro please?
Can you set up a repro please?
After I installed the package of version 12.0.0-beta.4, it works. I can use RetryError now.
Describe the bug
import { RetryError } from 'got'
Expected behavior
import { RetryError } from 'got' ...
Code to reproduce
Checklist