microsoft / microsoft/tsyringe
[feat]: make the `DependencyContainer#disposed` property available
Open
@Xapphire13 is already working on this.
Since Dec 22, 2024.
awaiting triage
enhancement
- Dominant language
- TypeScript
- Stars
- 6k
- Forks
- 184
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
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:
class InternalDependencyContainer implements DependencyContainer {
private disposed = false;
// Unchanged code...
public isDisposed() {
return this.disposed;
}
}
export default interface DependencyContainer extends Disposable {
// Unchanged code...
isDisposed(): boolean;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.