@kayahr/signal

    Interface SignalContext

    A signal context which can be set by frameworks to automatically destroy registered destroyable signals (or other destroyable objects) when the context is destroyed. A UI framework for example can create and set signal context for a UI component and then run its initialization code. During this component initialization signals can be created which must be destroyed when component is destroyed. When the framework wants to destroy the component it can destroy the corresponding signal context to automatically destroy any signals created while this context was active.

    interface SignalContext {
        registerDestroyable(destroyable: Destroyable): void;
    }
    Index

    Methods

    • Registers the given destroyable object in this signal context.

      Parameters

      • destroyable: Destroyable

        The destroyable object to register.

      Returns void

    MMNEPVFCICPMFPCPTTAAATR