(usageLimit: number, currentUsage: number)
| 21 | * the sentinel value. |
| 22 | */ |
| 23 | export function getPooledCreditsRemaining(usageLimit: number, currentUsage: number): number { |
| 24 | if (usageLimit >= ON_DEMAND_UNLIMITED) return ON_DEMAND_UNLIMITED |
| 25 | return Math.max(0, usageLimit - currentUsage) |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * The maximum usage that is never billed: the plan's included allowance |
no outgoing calls
no test coverage detected