Is the options inheritance does not work by design?
As a user of the library I would expect that the child container will inherit the options of the parent container. Option " skipBaseClassChecks" in particular is not inherited from the parent container.
Expected Behavior
I would expect that the options will be inherited when creating a child container
Current Behavior
The options are not inherited when doing the following:
const childContainer = ctx.container.createChild(); childContainer.options.skipBaseClassChecks = true;
Where the ctx is interfaces.Context from the factory binding
Possible Solution
Inherit the options when creating a child container
Steps to Reproduce (for bugs)
- Create a container with the options skipBaseClassChecks = true
- Create child of the given container
- Verify that shipBaseCalssChecks is false in child options
Hi @Lolik21 options seems to be inherited:
public createChild(containerOptions?: interfaces.ContainerOptions): Container {
const child = new Container(containerOptions || this.options);
child.parent = this;
return child;
}
Could you provide a minimal example in order to reproduce it? I followed your steps an skipBaseClassChecks is equal to true