decord/source/modules/chat/native/ChatChangesetUpdateTracker.tsx

31 lines
802 B
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 10475
// Function ID: 10476
2026-07-20 16:05:17 +00:00
// Name: weakMap
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: getAndIncrementChangesetIdForChat, getChangesetIdForChat
2026-08-15 05:55:55 +00:00
// Module 10475 (weakMap)
2026-07-20 16:05:17 +00:00
const weakMap = new WeakMap();
2026-07-23 10:11:24 +00:00
let result = require("set").fileFinishedImporting("modules/chat/native/ChatChangesetUpdateTracker.tsx");
2026-07-20 16:05:17 +00:00
export const getAndIncrementChangesetIdForChat = function getAndIncrementChangesetIdForChat(arg0) {
2026-07-29 08:29:29 +00:00
let num = weakMap.get(arg0);
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
const sum = num + 1;
const result = weakMap.set(arg0, sum);
return sum;
};
export const getChangesetIdForChat = function getChangesetIdForChat(current) {
let num = 0;
if (null != current) {
2026-07-29 08:29:29 +00:00
let num2 = weakMap.get(current);
if (num2 == null) {
num2 = 0;
2026-07-20 16:05:17 +00:00
}
num = num2;
}
return num;
};