Open shellvon opened 5 months ago
Currently , the agent type is: https://github.com/sindresorhus/got/blob/23b2f26ea76863bcf58045287eebaa81fcbb99bf/source/core/options.ts#L44-L48
agent
as you can see, false is a valid type, but when i set agent to false, it throws an error!
false
https://github.com/sindresorhus/got/blob/23b2f26ea76863bcf58045287eebaa81fcbb99bf/source/core/options.ts#L1136-L1146
Can't set agent when agent type is false
change type declare (maybe remove false type?) or just make false as a valid type when set agent, I think the latter would be better.
// just set agent to false.
Describe the bug
Currently , the
agent
type is: https://github.com/sindresorhus/got/blob/23b2f26ea76863bcf58045287eebaa81fcbb99bf/source/core/options.ts#L44-L48as you can see,
false
is a valid type, but when i set agent to false, it throws an error!https://github.com/sindresorhus/got/blob/23b2f26ea76863bcf58045287eebaa81fcbb99bf/source/core/options.ts#L1136-L1146
Actual behavior
Can't set agent when agent type is
false
Expected behavior
change type declare (maybe remove
false
type?) or just makefalse
as a valid type when set agent, I think the latter would be better.Code to reproduce
Checklist