Convert mergeMap.js to ts

This commit is contained in:
RMidhunSuresh 2021-11-16 15:37:32 +05:30
parent 1549d8add0
commit 88ec1b575d
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ limitations under the License.
import {MEGOLM_ALGORITHM, DecryptionSource} from "./common.js";
import {groupEventsBySession} from "./megolm/decryption/utils";
import {mergeMap} from "../../utils/mergeMap.js";
import {mergeMap} from "../../utils/mergeMap";
import {groupBy} from "../../utils/groupBy";
import {makeTxnId} from "../common.js";

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
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

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
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) {
for (const [key, value] of src.entries()) {
dst.set(key, value);