Skip to main content
Module

x/cache_mapset/types.ts>MapLike

Maps and Sets with cache replacement policies, TC39 proposal-policy-map-set implementation
Latest
interface MapLike
import { type MapLike } from "https://deno.land/x/cache_mapset@1.0.0/types.ts";

Map without Iterator and its related members.

Properties

size: number

The number of entries.

has: (key: K) => boolean

Whether has an entry with the given key.

get: (key: K) => V | undefined

Returns the value of the entry with the given key, if any such entry exists; otherwise returns undefined.

set: (key: K, value: V) => this

Adds an entry with the given key mapped to the given value.

delete: (key: K) => boolean

Deletes the entry with the given key.

clear: () => void

Removes all entries.