From 633c92eae865e957121e08de634aeee11a8b3992 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Mon, 24 Apr 2023 14:03:36 +0200 Subject: Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated) --- .../matrix-events-sdk/lib/NamespacedMap.d.ts | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 includes/external/matrix/node_modules/matrix-events-sdk/lib/NamespacedMap.d.ts (limited to 'includes/external/matrix/node_modules/matrix-events-sdk/lib/NamespacedMap.d.ts') diff --git a/includes/external/matrix/node_modules/matrix-events-sdk/lib/NamespacedMap.d.ts b/includes/external/matrix/node_modules/matrix-events-sdk/lib/NamespacedMap.d.ts new file mode 100644 index 0000000..461f528 --- /dev/null +++ b/includes/external/matrix/node_modules/matrix-events-sdk/lib/NamespacedMap.d.ts @@ -0,0 +1,55 @@ +import { NamespacedValue } from "./NamespacedValue"; +import { Optional } from "./types"; +declare type NS = NamespacedValue; +/** + * A `Map` implementation which accepts a NamespacedValue as a key, and arbitrary value. The + * namespaced value must be a string type. + */ +export declare class NamespacedMap { + protected internalMap: Map; + /** + * Creates a new map with optional seed data. + * @param {Array<[NS, V]>} initial The seed data. + */ + constructor(initial?: [NS, V][]); + /** + * Gets a value from the map. If the value does not exist under + * either namespace option, falsy is returned. + * @param {NS} key The key. + * @returns {Optional} The value, or falsy. + */ + get(key: NS): Optional; + /** + * Sets a value in the map. + * @param {NS} key The key. + * @param {V} val The value. + */ + set(key: NS, val: V): void; + /** + * Determines if any of the valid namespaced values are present + * in the map. + * @param {NS} key The key. + * @returns {boolean} True if present. + */ + has(key: NS): boolean; + /** + * Removes all the namespaced values from the map. + * @param {NS} key The key. + */ + delete(key: NS): void; + /** + * Determines if the map contains a specific namespaced value + * instead of the parent NS type. + * @param {string} key The key. + * @returns {boolean} True if present. + */ + hasNamespaced(key: string): boolean; + /** + * Gets a specific namespaced value from the map instead of the + * parent NS type. Returns falsy if not found. + * @param {string} key The key. + * @returns {Optional} The value, or falsy. + */ + getNamespaced(key: string): Optional; +} +export {}; -- cgit