Skip to content

MapOfSets<Key, Value>

Unofficial

A map where each key is associated with a set of values.

Import:

import type { MapOfSets } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface MapOfSets<Key, Value>

Properties

Property Type Description
data Map<Key, Set<Value>> Internal map storing key-to-set mappings.

Methods

Method Returns Description
add(key, value) void Add a value to the set associated with the given key.
delete(key, value) void Remove a value from the set associated with the given key.
get(key) null | Set<Value> Get the set of values for the given key, or null if not found.
getArray(key) Value[] Get the values for the given key as an array.

Links to this page: