From ce24c878378ab65a14494222f65d6c74f3e63b49 Mon Sep 17 00:00:00 2001 From: Alex Ni <12097569+nialexsan@users.noreply.github.com> Date: Fri, 3 Nov 2023 16:10:26 -0400 Subject: [PATCH] fix config type --- packages/util-logger/src/util-logger.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/util-logger/src/util-logger.ts b/packages/util-logger/src/util-logger.ts index 566edaa08..fdaf684d2 100644 --- a/packages/util-logger/src/util-logger.ts +++ b/packages/util-logger/src/util-logger.ts @@ -1,6 +1,12 @@ +interface IConfig { + get: (key: string) => T; +} + +type Config = IConfig & (() => IConfig) | null + // Config dependency injected into logger to break circular dependency -let config: any = null -export const setConfig = (_config: any) => { +let config: Config = null +export const setConfig = (_config: Config) => { config = _config }