[@types/opossum] Add new CircuitBreaker.shutdown().

https://github.com/nodeshift/opossum/pull/250
This commit is contained in:
Matt R. Wilson
2019-01-28 12:32:49 -07:00
parent 5614607c3b
commit 157516ea34
2 changed files with 5 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for opossum 1.9
// Type definitions for opossum 1.10
// Project: https://github.com/nodeshift/opossum
// Definitions by: Quinn Langille <https://github.com/quinnlangille>
// Willy Zhang <https://github.com/merufm>
@@ -23,6 +23,7 @@ export class CircuitBreaker extends EventEmitter {
readonly closed: boolean;
readonly opened: boolean;
readonly halfOpen: boolean;
readonly isShutdown: boolean;
readonly status: Status;
readonly stats: Stats;
readonly hystrixStats: HystrixStats;
@@ -40,6 +41,7 @@ export class CircuitBreaker extends EventEmitter {
func: (...args: any[]) => Promise<any>,
interval?: number
): void;
shutdown(): void;
}
export enum Event {

View File

@@ -39,6 +39,7 @@ breaker.closed; // $ExpectType boolean
breaker.opened; // $ExpectType boolean
breaker.halfOpen; // $ExpectType boolean
breaker.warmUp; // $ExpectType boolean
breaker.isShutdown; // $ExpectType boolean
breaker.volumeThreshold; // $ExpectType number
breaker.status.stats.latencyMean; // $ExpectType number
breaker.stats.latencyTimes; // $ExpectType number[]
@@ -49,6 +50,7 @@ breaker.open(); // $ExpectType void
breaker.close(); // $ExpectType void
breaker.disable(); // $ExpectType void
breaker.enable(); // $ExpectType void
breaker.shutdown(); // $ExpectType void
// The following are examples are from the libs README and official documentation
// https://nodeshift.github.io/opossum/index.html.