Remove type cast in ol/structs/LRUCache
This commit is contained in:
@@ -261,12 +261,12 @@ class LRUCache extends EventTarget {
|
|||||||
set(key, value) {
|
set(key, value) {
|
||||||
assert(!(key in this.entries_),
|
assert(!(key in this.entries_),
|
||||||
16); // Tried to set a value for a key that is used already
|
16); // Tried to set a value for a key that is used already
|
||||||
const entry = /** @type {Entry} */ ({
|
const entry = {
|
||||||
key_: key,
|
key_: key,
|
||||||
newer: null,
|
newer: null,
|
||||||
older: this.newest_,
|
older: this.newest_,
|
||||||
value_: value
|
value_: value
|
||||||
});
|
};
|
||||||
if (!this.newest_) {
|
if (!this.newest_) {
|
||||||
this.oldest_ = entry;
|
this.oldest_ = entry;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user