fix: update type of eureka-js-client config obj (#38585)

This commit is contained in:
WayJam So 2019-10-04 05:34:07 +08:00 committed by Ryan Cavanaugh
parent 98cebea79b
commit 09169a799d

View File

@ -1,9 +1,10 @@
// Type definitions for eureka-js-client 4.4
// Type definitions for eureka-js-client 4.5
// Project: https://github.com/jquatier/eureka-js-client
// Definitions by: Ilko Hoffmann <https://github.com/Schnillz>
// Karl O. <https://github.com/karl-run>
// Tom Barton <https://github.com/tombarton>
// Josh Sullivan <https://github.com/jpsullivan>
// WayJam So <https://github.com/imsuwj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export class Eureka {
@ -23,6 +24,13 @@ export namespace EurekaClient {
requestMiddleware?: EurekaMiddlewareConfig;
instance: EurekaInstanceConfig;
eureka: EurekaClientConfig;
shouldUseDelta?: boolean;
logger?: {
warn: (...args: any[]) => void;
info: (...args: any[]) => void;
debug: (...args: any[]) => void;
error: (...args: any[]) => void;
};
}
interface EurekaInstanceConfig {
app: string;
@ -70,13 +78,6 @@ export namespace EurekaClient {
registerWithEureka?: boolean;
useLocalMetadata?: boolean;
preferIpAddress?: boolean;
shouldUseDelta?: boolean;
logger?: {
warn: (...args: any[]) => void;
info: (...args: any[]) => void;
debug: (...args: any[]) => void;
error: (...args: any[]) => void;
};
}
interface EurekaYmlConfig {
cwd: string;