(credits: number = 4)
| 863 | } |
| 864 | |
| 865 | private optimisticUpdateQuota(credits: number = 4): void { |
| 866 | try { |
| 867 | const key = 'observer-quota-remaining'; |
| 868 | const current = localStorage.getItem(key); |
| 869 | if (current !== null) { |
| 870 | const n = parseInt(current, 10); |
| 871 | if (!isNaN(n)) { |
| 872 | localStorage.setItem(key, (n - credits).toString()); |
| 873 | window.dispatchEvent(new CustomEvent('quotaUpdated')); |
| 874 | } |
| 875 | } |
| 876 | } catch {} |
| 877 | } |
| 878 | } |
no outgoing calls
no test coverage detected