16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
export function delay(delay: number) {
|
|
return new Promise((resolve) => {
|
|
setTimeout(resolve, delay);
|
|
});
|
|
}
|
|
|
|
export type ContainerHandler = {
|
|
populateContainer: () => void;
|
|
shuffleContainer: () => void;
|
|
getCardsPosition: (cards: string) => any;
|
|
startAnimation: () => void;
|
|
endAnimation: () => void;
|
|
};
|
|
|
|
export const containerEvents = reactive(new Map<string, ContainerHandler>());
|