mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Convert mergeMap.js to ts
This commit is contained in:
parent
1549d8add0
commit
88ec1b575d
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
import {MEGOLM_ALGORITHM, DecryptionSource} from "./common.js";
|
import {MEGOLM_ALGORITHM, DecryptionSource} from "./common.js";
|
||||||
import {groupEventsBySession} from "./megolm/decryption/utils";
|
import {groupEventsBySession} from "./megolm/decryption/utils";
|
||||||
import {mergeMap} from "../../utils/mergeMap.js";
|
import {mergeMap} from "../../utils/mergeMap";
|
||||||
import {groupBy} from "../../utils/groupBy";
|
import {groupBy} from "../../utils/groupBy";
|
||||||
import {makeTxnId} from "../common.js";
|
import {makeTxnId} from "../common.js";
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {DecryptionChanges} from "./DecryptionChanges.js";
|
import {DecryptionChanges} from "./DecryptionChanges.js";
|
||||||
import {mergeMap} from "../../../../utils/mergeMap.js";
|
import {mergeMap} from "../../../../utils/mergeMap";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that contains all the state loaded from storage to decrypt the given events
|
* Class that contains all the state loaded from storage to decrypt the given events
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function mergeMap(src, dst) {
|
export function mergeMap<K, V>(src: Map<K, V> | undefined, dst: Map<K, V>) {
|
||||||
if (src) {
|
if (src) {
|
||||||
for (const [key, value] of src.entries()) {
|
for (const [key, value] of src.entries()) {
|
||||||
dst.set(key, value);
|
dst.set(key, value);
|
Loading…
Reference in New Issue
Block a user