Currently, the default cache type in the codebase is QuickLRU<string, string>, as seen in the implementation at this line and this line. However, according to the type definitions specified in the TypeScript declarations file here, the expected type for the cache is Map<string, string>.
When attempting to use this library, TypeScript reports a type mismatch error, likely because the provided type (QuickLRU<string, string>) does not match the expected type (Map<string, string>).
report example:
Given the current implementation, the cache type here can be any object that implements the following interface:
Currently, the default cache type in the codebase is
QuickLRU<string, string>
, as seen in the implementation at this line and this line. However, according to the type definitions specified in the TypeScript declarations file here, the expected type for the cache isMap<string, string>
.When attempting to use this library, TypeScript reports a type mismatch error, likely because the provided type (
QuickLRU<string, string>
) does not match the expected type (Map<string, string>
).report example:
Given the current implementation, the cache type here can be any object that implements the following interface:
In other words,
cache
can be any object instance that has bothhas
andget
methods defined.