mcollina / async-cache-dedupe

Async cache with dedupe support
MIT License
640 stars 40 forks source link

Allow define.ttl to be a number or function in the typescript definitions #58

Closed thomaspeklak closed 1 year ago

thomaspeklak commented 1 year ago

The type definitions only allow a number for ttl in define options. This should fix this problem.

I am not sure about the best way to test this issue. It definitely gives an error if the types mismatch.