Files
mermaid/src/interactionDb.ts
2022-09-02 11:44:06 +05:30

11 lines
262 B
TypeScript

let interactionFunctions: (() => void)[] = [];
export const addFunction = (func: () => void) => {
interactionFunctions.push(func);
};
export const attachFunctions = () => {
interactionFunctions.forEach((f) => {
f();
});
interactionFunctions = [];
};