Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Neosoulink opened this issue Dec 22, 2024 · 0 comments
Open

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

Neosoulink opened this issue Dec 22, 2024 · 0 comments

Comments

@Neosoulink
Copy link

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;
}
@Neosoulink Neosoulink changed the title [feat]: make the InternalDependencyContainer#disposed property available [feat]: make the DependencyContainer#disposed property available Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants