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;
}