Open robb-j opened 2 years ago
There could be a standard options key in every context, or a second argument to keep the context clean.
options
non-standard containers:
CarbonRoutes
EmailService
I18nService
JwtService
MetricsSockets
PretalxService
RegistrationRoutes
e.g.
type Context = Pick<DeconfBaseContext, 'jwt' | 'semaphore'> & { options: { someBespokeConfig: true } } // or type Context = Pick<DeconfBaseContext, 'jwt' | 'semaphore'> interface Options { someBespokeConfig: true } class Something { #context: Context #options Options constructor(context: Context, options: Options) { this.#context = context this.#options = options } }
There could be a standard
options
key in every context, or a second argument to keep the context clean.non-standard containers:
CarbonRoutes
EmailService
I18nService
JwtService
MetricsSockets
PretalxService
RegistrationRoutes
e.g.