@lppedd/di-wise-neo 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![status](https://img.shields.io/badge/status-beta-AC29EC)](https://github.com/lppedd/di-wise-neo/blob/main/CHANGELOG.md#0100)
9
9
  [![build](https://img.shields.io/github/actions/workflow/status/lppedd/di-wise-neo/test.yml.svg?branch=main)](https://github.com/lppedd/di-wise-neo/actions/workflows/test.yml)
10
10
  [![coverage](https://img.shields.io/codecov/c/github/lppedd/di-wise-neo/main?token=R9XZFTQ0BA)](https://app.codecov.io/gh/lppedd/di-wise-neo/tree/main/src)
11
- [![license](https://img.shields.io/github/license/lppedd/di-wise-neo?color=blue)](https://github.com/lppedd/di-wise-neo/blob/main/LICENSE)
11
+ [![license](https://img.shields.io/badge/license-MIT-F7F7F7)](https://github.com/lppedd/di-wise-neo/blob/main/LICENSE)
12
12
 
13
13
  </div>
14
14
  <img align="center" src="./.github/images/neo-wall.jpg" alt="di-wise-neo" style="border: 3px solid black; border-radius: 15px;" />
package/dist/cjs/index.js CHANGED
@@ -509,9 +509,8 @@ function isDisposable(value) {
509
509
  this.myDisposed = false;
510
510
  this.myParent = parent;
511
511
  this.myOptions = {
512
- autoRegister: false,
513
- defaultScope: Scope.Transient,
514
- ...options
512
+ autoRegister: options?.autoRegister ?? false,
513
+ defaultScope: options?.defaultScope ?? Scope.Transient
515
514
  };
516
515
  this.myTokenRegistry = new TokenRegistry(this.myParent?.myTokenRegistry);
517
516
  }
@@ -532,8 +531,8 @@ function isDisposable(value) {
532
531
  createChild(options) {
533
532
  this.checkDisposed();
534
533
  const container = new ContainerImpl(this, {
535
- ...this.myOptions,
536
- ...options
534
+ autoRegister: options?.autoRegister ?? this.myOptions.autoRegister,
535
+ defaultScope: options?.defaultScope ?? this.myOptions.defaultScope
537
536
  });
538
537
  this.myChildren.add(container);
539
538
  return container;
@@ -945,10 +944,7 @@ function isDisposable(value) {
945
944
 
946
945
  /**
947
946
  * Creates a new container.
948
- */ function createContainer(options = {
949
- autoRegister: false,
950
- defaultScope: Scope.Transient
951
- }) {
947
+ */ function createContainer(options) {
952
948
  return new ContainerImpl(undefined, options);
953
949
  }
954
950