mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-03 19:32: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 = {
|
export type SingletonApi = {
|
||||||
shutdown: () => void | Promise<void>
|
shutdown: () => void | Promise<void>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SingletonBaseConfig = {
|
||||||
|
logger: Logger
|
||||||
|
}
|
||||||
|
|
||||||
export const mkSingleton = <
|
export const mkSingleton = <
|
||||||
TConfig,
|
TConfig,
|
||||||
TApi extends SingletonApi | Promise<SingletonApi>
|
TApi extends SingletonApi | Promise<SingletonApi>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user