12 lines
377 B
TypeScript
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));
|
|
}
|