Vinyl
    Preparing search index...

    Interface Lazy<T>

    Any object that may be disposed.

    interface Lazy<T> {
        constructed: boolean;
        set value(value: T): void;
        clear(): void;
        dispose(): void;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Accessors

    Methods

    Properties

    constructed: boolean

    True if the lazy instance has been constructed.

    Accessors

    • set value(value: T): void

      Sets the lazy instance's value. If disposed, a DisposedError will be thrown.

      Parameters

      • value: T

      Returns void

    Methods

    • Clears the lazy instance, disposing its value. Unlike dispose(), this allows the lazy instance to be reconstructed upon the next get. Typically used only in unit testing. May be used after dispose.

      Returns void

    • Returns void