mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-02 19:02:29 +00:00
chore: singleton base config
This commit is contained in:
parent
4cd7dc93cf
commit
baad010305
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user