Files
makelore/src/lib/works-square-usage-events.ts
2026-07-29 17:22:35 +08:00

12 lines
377 B
TypeScript

export const WORKS_SQUARE_TOKEN_USAGE_STALE_EVENT = 'works-square-token-usage:stale';
export function dispatchWorksSquareTokenUsageStale(): void {
if (typeof window === 'undefined' || typeof window.dispatchEvent !== 'function') {
return;
}
if (typeof Event !== 'function') {
return;
}
window.dispatchEvent(new Event(WORKS_SQUARE_TOKEN_USAGE_STALE_EVENT));
}