Skip to content

[feat]: make the DependencyContainer#disposed property available #249

@Neosoulink

Description

@Neosoulink

Description

For testing related to the container disposal, I realized that the InternalDependencyContainer has a disposed property but it's private.

Only for cases like testing, this property can be very useful and should be public or have a getter

Alternate solutions

As a solution or an alternative suggestion, we can have something like:

InternalDependencyContainer

class InternalDependencyContainer implements DependencyContainer {
  private disposed = false;

  // Unchanged code...

  public isDisposed() {
    return this.disposed;
  }
}

DependencyContainer

export default interface DependencyContainer extends Disposable {
  // Unchanged code...

  isDisposed(): boolean;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions