/** * Retrieves the value associated with the given key from a Map. * * @param map - A Map instance to retrieve the value from. * @param key - The key whose associated value is to be returned. * @returns - The value associated with the specified key. * @throws - If the key is not found in the map. */ export declare function safeGet(map: Map, key: K | undefined): V; /** * Retrieves the value associated with the given key from a WeakMap. * * @param map - A WeakMap instance to retrieve the value from. * @param key - The key whose associated value is to be returned. * @returns - The value associated with the specified key. * @throws - If the key is not found in the weakmap. */ export declare function safeGet(map: WeakMap, key: K | undefined): V;