epicweb-dev / cachified

🤑 wrap virtually everything that can store by key to act as cache with ttl/max-age, stale-while-validate, parallel fetch protection and type-safety support
MIT License
916 stars 26 forks source link

Prefer type inference from options#getFreshValue over reporter #93

Closed Xiphe closed 8 months ago

Xiphe commented 8 months ago

This fixes an issue where the unknown Value type of some reporters has been infered by cachified thereby ignoring the much more useful return type of getFreshValue

fix https://github.com/epicweb-dev/cachified/issues/70

BREAKING CHANGE: CachifiedOptions#reporter has been removed in favor of passing a reporter as second argument to cachified

MIGRATION: Change cachified({ reporter: myReporter /* ... */ }) to cachified({ /* ... */ }, myReporter)

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 5.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: