mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-06 05:17:37 +01:00
9 lines
259 B
TypeScript
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();
|
|
};
|
|
}
|