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

    Interface IDbgCmds

    Context returned from adding a command to allow removal

    interface IDbgCmds {
        add: (name: string, theCmd: IDbgCmd) => IDbgCmdCtx;
        each: (cb: (name: string, value: IDbgCmdCtx) => void) => void;
        exec: (cmdLine: string, cmdContext?: DbgContextValues) => any;
        get: (name: string, dfValue?: IDbgCmdCtx) => IDbgCmdCtx;
        has: (name: string) => boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    add: (name: string, theCmd: IDbgCmd) => IDbgCmdCtx

    Add or Replace the command to the current commands for the context

    Type Declaration

      • (name: string, theCmd: IDbgCmd): IDbgCmdCtx
      • Parameters

        • name: string

          The name to register this command as

        • theCmd: IDbgCmd

          The debug command

        Returns IDbgCmdCtx

        A debug context for the debug command

    each: (cb: (name: string, value: IDbgCmdCtx) => 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: IDbgCmdCtx) => void): void
      • Parameters

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

          The callback function to call

        Returns void

    exec: (cmdLine: string, cmdContext?: DbgContextValues) => any

    Execute another function from the current function

    Type Declaration

      • (cmdLine: string, cmdContext?: DbgContextValues): any
      • Parameters

        • cmdLine: string

          The full command line to execute

        • OptionalcmdContext: DbgContextValues

          Additional context variables to include in the scope of executing the command.

        Returns any

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

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

    Type Declaration

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

        • name: string

          The name of the value to return

        • OptionaldfValue: IDbgCmdCtx

          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 IDbgCmdCtx

        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