lisaogren / axios-cache-adapter

Caching adapter for axios. Store request results in a configurable store to prevent unneeded network requests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type for 'limit' in adapter options is wrong

sgarciac opened this issue · comments

Hello, in the type definitions file:

https://github.com/RasCarlito/axios-cache-adapter/blob/master/axios-cache-adapter.d.ts#L37

limit is defined as boolean, but it should be false | number

+1
Documentation reading

	/**
	 * {Number} Maximum number of cached request (last in, first out queue system),
	 * defaults to `false` for no limit. *Cannot be overridden per request*
	 */

Isn't this defaulting to undefined?

You are right.

(just to be clear, the issue is that currently one can not set a number)

There has been multiple pull requests for this for half a year. Is the repo owner planning to merge one of them in?