diff --git a/types/opossum/index.d.ts b/types/opossum/index.d.ts index f1e14a939b..b955f940e3 100644 --- a/types/opossum/index.d.ts +++ b/types/opossum/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for opossum 1.8 -// Project: https://github.com/bucharest-gold/opossum +// Type definitions for opossum 1.9 +// Project: https://github.com/nodeshift/opossum // Definitions by: Quinn Langille +// Lance Ball // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -31,6 +32,7 @@ export class CircuitBreaker { static readonly hystrixStats: symbol; static readonly enabled: symbol; static readonly warmUp: symbol; + static readonly volumeThreshold: symbol; } export interface CircuitBreakerOptions { @@ -45,6 +47,7 @@ export interface CircuitBreakerOptions { errorThresholdPercentage?: number; enabled?: boolean; allowWarmUp?: boolean; + volumeThreshold?: number; } export default function circuitBreaker( diff --git a/types/opossum/opossum-tests.ts b/types/opossum/opossum-tests.ts index 3f020eff52..9ec5425416 100644 --- a/types/opossum/opossum-tests.ts +++ b/types/opossum/opossum-tests.ts @@ -17,7 +17,8 @@ const options: CircuitBreakerOptions = { capacity: 1, errorThresholdPercentage: 1, enabled: true, - allowWarmUp: true + allowWarmUp: true, + volumeThreshold: 1 }; const testWithOptions: CircuitBreaker = circuitBreaker(_blank, options); @@ -44,3 +45,4 @@ const shouldBeSymbol7: symbol = CircuitBreaker.hystrixStats; const shouldBeSymbol8: symbol = CircuitBreaker.status; const shouldBeSymbol9: symbol = CircuitBreaker.enabled; const shouldBeSymbol10: symbol = CircuitBreaker.warmUp; +const shouldBeSymbol11: symbol = CircuitBreaker.volumeThreshold;