Closed javierblancosp closed 4 years ago
That's intentional. Anything not in TS types or documented are not guaranteed to be stable.
Share what options you need and we can consider officially exposing them.
:O, basically the only one we were using right now is the 'shared' property from https://github.com/kornelski/http-cache-semantics to allow some particular cases for shared cache. The other properties, I think are not that important.
~Also the options aren't request options. These are constructor options that are passed to CachePolicy.~ Please open an issue at cacheable-request.
Edit: indeed the constructor options are the same as request options.
m but correct me if I'm wrong but, if cacheable-request add this properties in their typing, won't also be available on Got. The two things will be needed no, add it on cacheable-request, and also got should extend from it or put it in another property as you prefer.
got should extend from it
That's what should be done.
Yep, so there is already a type for that package 'https://www.npmjs.com/package/@types/http-cache-semantics' should I create a PR to extends from that?
Yep, feel free. Alternatively you can fetch the arguments from cacheable-request
and use these instead. That would work too.
Describe the bug
The options of the cache providers are not in Got typing. I can do a contribution if it's needed ;)
Actual behavior
Options from https://github.com/kornelski/http-cache-semantics used by https://github.com/lukechilds/cacheable-request are not reflected on got typing options but still are available to use it and useful.
Expected behavior
Have the cache options on got type definition
Code to reproduce
Checklist