import { CacheProvider , CacheStorageKey } from '@discordoo/providers' ; export async function cacheProviderFindPolyfill < K = string , V = any , P extends CacheProvider = CacheProvider > ( provider , keyspace , storage , predicate ) { let result , found = false ; await provider . forEach < K , V > ( keyspace , storage , async ( value , key ) => { if ( ! found && await predicate ( value , key , provider ) ) { result = value ; found = true ; } } ) ; return result ; }