mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 01:31:45 +00:00
Chore: Add callbacks to eureka-js-client methods
This commit is contained in:
@@ -43,3 +43,11 @@ const newerClient = new Eureka({
|
||||
port: 32768,
|
||||
}
|
||||
});
|
||||
|
||||
// Test callbacks
|
||||
newerClient.start((err: Error) => {});
|
||||
newerClient.start(() => {});
|
||||
newerClient.start();
|
||||
newerClient.stop((err: Error) => {});
|
||||
newerClient.start(() => {});
|
||||
newerClient.stop();
|
||||
|
||||
Vendored
+5
-3
@@ -1,12 +1,14 @@
|
||||
// Type definitions for eureka-js-client 4.4
|
||||
// Project: https://github.com/jquatier/eureka-js-client
|
||||
// Definitions by: Ilko Hoffmann <https://github.com/Schnillz>, Karl O. <https://github.com/karl-run>
|
||||
// Definitions by: Ilko Hoffmann <https://github.com/Schnillz>
|
||||
// Karl O. <https://github.com/karl-run>
|
||||
// Tom Barton <https://github.com/tombarton>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export class Eureka {
|
||||
constructor(config: EurekaClient.EurekaConfig)
|
||||
start(): void;
|
||||
stop(): void;
|
||||
start(cb?: (err?: Error) => void): void;
|
||||
stop(cb?: (err?: Error) => void): void;
|
||||
getInstancesByAppId(appId: string): string[];
|
||||
getInstancesByVipAddress(vidAddress: string): string [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user