diff --git a/docs/backend-system/architecture/03-services.md b/docs/backend-system/architecture/03-services.md index 022aab202b..a06847df0e 100644 --- a/docs/backend-system/architecture/03-services.md +++ b/docs/backend-system/architecture/03-services.md @@ -195,8 +195,8 @@ When declaring a service factory you may also want to make the export the buildi ```ts export class DefaultFooService { - static create(options: { transform: (foo: string) => string }) { - return new DefaultFooService(options.transform ?? ((foo) => foo); + static create(options: { transform?: (foo: string) => string }) { + return new DefaultFooService(options.transform ?? (foo => foo)); } private constructor(private readonly transform: (foo: string) => string) {} @@ -264,7 +264,7 @@ In some cases it might be beneficial to allow users of your service factory to p ```ts const fooServiceFactoryWithOptions = (options?: { - transform: (foo: string) => string; + transform?: (foo: string) => string; }) => createServiceFactory({ service: fooServiceRef,