lifecycle-utils
    Preparing search index...

    Class ScopeExitHandle<Callback>

    The handle returned from scopeExit that allows calling or skipping the provided onExit function.

    Calling .call() will call the provided onExit function immediately, and prevent it from being called again.

    Calling .skip() will prevent the onExit function from being called.

    If neither .call() nor .skip() is called, the onExit function will be called automatically when the handle is disposed.

    Type Parameters

    • const Callback extends () => Promise<void> | void
    Index

    Accessors

    • get called(): boolean

      Whether the onExit function has been called

      Returns boolean

    • get skipped(): boolean

      Whether the onExit function has been skipped

      Returns boolean

    Methods

    • Prevent the onExit function from being called if it has not been called yet

      Returns void