Files
mermaid/src/interactionDb.ts
2022-08-21 00:59:54 +05:30

11 lines
258 B
TypeScript

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