@nevware21/ts-debug
    Preparing search index...

    Interface IDbgContextItems<T>

    The generic context used for passing

    interface IDbgContextItems<T> {
        each: (cb: (name: string, value: T) => void) => void;
        get: (name: string, dfValue?: T) => T;
        has: (name: string) => boolean;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    each: (cb: (name: string, value: T) => void) => void

    For each key defined for the current context (and it's parent) call the provided callback function with each key name and it's value. This will only call the callback function once for each name even when the same name is presen in the current instance and it's parent.

    Type Declaration

      • (cb: (name: string, value: T) => void): void
      • Parameters

        • cb: (name: string, value: T) => void

          The callback function to call

        Returns void

    get: (name: string, dfValue?: T) => T

    Return the named context value from this instance or it's parent if present.

    Type Declaration

      • (name: string, dfValue?: T): T
      • Parameters

        • name: string

          The name of the value to return

        • OptionaldfValue: T

          If the named values does not exist in this instance or it's parent then return this value. The default will not be returned even if the value for the key is undefined or null.

        Returns T

        The value contained in the context or the default

    has: (name: string) => boolean

    Return whether the named context value is available from this instance ir it's parent.

    Type Declaration

      • (name: string): boolean
      • Parameters

        • name: string

          The name of the value to check if it's available

        Returns boolean

        true if it's present otherwise false