Skip to content

Commit

Permalink
Change terminate() method description and add a destroy method
Browse files Browse the repository at this point in the history
The destroy method will completely destroy the application, its states, registered bindings and resolved instances.
  • Loading branch information
aedart committed Apr 29, 2024
1 parent 11561c0 commit 99f50b9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/contracts/src/core/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ export default interface Application extends Container
/**
* Terminate this application
*
* **Note**: _Method will reset the {@link isRunning} state of this application.
* However, the application still remains in a [bootstrapped]{@link hasBeenBootstrapped}
* and [booted]{@link hasBooted} state. Call {@link destroy} to completely destroy
* this application's bootstrap and boot state, as well as registered bindings._
*
* @see destroy
*
* @return {Promise<boolean>}
*
* @async
Expand All @@ -160,4 +167,15 @@ export default interface Application extends Container
* @return {this}
*/
terminating(callback: TerminationCallback): this;

/**
* Destroy this application instance
*
* **Note**: _Method resets this application's [bootstrapped]{@link hasBeenBootstrapped}
* and [booted]{@link hasBooted} states, [flushes]{@link flush} registered bindings
* and resolved instances, and other vital properties._
*
* @return {void}
*/
destroy(): void;
}

0 comments on commit 99f50b9

Please sign in to comment.