bitburner-src/src/Casino/utils.ts
2021-09-08 23:47:34 -04:00

9 lines
259 B
TypeScript

import * as React from "react";
export function trusted(f: () => void): (event: React.MouseEvent<HTMLElement, MouseEvent>) => any {
return function (event: React.MouseEvent<HTMLElement, MouseEvent>): any {
if (!event.isTrusted) return;
f();
};
}