/** * Lock to prevent user perform any action to quickly on the screen * For example: tap a button too fast ---> duplicate action */ declare class UserActionLock { keys: Set; lock(key: string): boolean; /** * Lock key and auto release the lock after an afterDurationMs * @param key locked key * @param afterDurationMs time to auto unlock the key */ lockAutoRelease({ key, afterDurationMs, }: { key: string; afterDurationMs: number; }): boolean; /** * Immmeditately release a key * @param key locked key */ release(key: string): void; /** * Auto release a key after a duration of miliseconds */ autoRelease({ key, afterDurationMs }: { key: string; afterDurationMs: number; }): void; /** * Create a specific UserActionLock instance for using on specific purpose */ create(): UserActionLock; } declare const instance: UserActionLock; export { instance as UserActionLock };