Contracts-TS Documentation
    Preparing search index...

    Interface Promisor<T>

    Interface for providing a deliverable for a Contract The main and required implementation is demand(). There are optional methods with appropriate defaults.

    interface Promisor<T> {
        decrementUsage(): number;
        demand(): OptionalType<T>;
        incrementUsage(): number;
    }

    Type Parameters

    • T

      The type of the deliverable

    Index

    Methods

    • Reference counting used for advanced resource management Decremented when no longer used Every successful 'open' must be followed by a 'close' at the appropriate time

      Returns number

      the usage count. This might be a constant

    • Reference counting used for advanced resource management Incremented when bound or by other Promisors Every successful 'open' must be followed by a 'close' at the appropriate time

      Returns number

      the usage count. This might be a constant