Skip to main content
Module

x/upsert/mixin.ts>Emplaceable

Maps for emplace, TC39 proposal-upsert implementation
Latest
interface Emplaceable
import { type Emplaceable } from "https://deno.land/x/upsert@1.2.0/mixin.ts";

Emplaceable API.

Methods

emplace(key: K, handler: EmplaceHandler<K, V, this>): V

Add a value to a map if the map does not already have something at key, and will also update an existing value at key.

emplace(key: K, handler: Insertable<K, V, this>): V
emplace(key: K, handler: Updatable<K, V, this>): V | undefined
variable Emplaceable
Deprecated
Deprecated

rename to emplaceable.

import { Emplaceable } from "https://deno.land/x/upsert@1.2.0/mixin.ts";

Mixin for emplace.