chore: singleton base config

This commit is contained in:
Ben Allfree 2023-06-14 11:31:18 -07:00
parent 4cd7dc93cf
commit baad010305

View File

@ -1,6 +1,13 @@
import { Logger } from './Logger'
export type SingletonApi = {
shutdown: () => void | Promise<void>
}
export type SingletonBaseConfig = {
logger: Logger
}
export const mkSingleton = <
TConfig,
TApi extends SingletonApi | Promise<SingletonApi>