mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[@types/opossum] Add new CircuitBreaker.shutdown().
https://github.com/nodeshift/opossum/pull/250
This commit is contained in:
4
types/opossum/index.d.ts
vendored
4
types/opossum/index.d.ts
vendored
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user