• Public
  • Public/Protected
  • All

Module debug



  • error(text: string): true
  • Show an error in the console and on the screen.


    • text: string

      The error message

    Returns true

    Always returns true, for consistency with log.

  • log(text: string): boolean
  • Print a logging message to console and on the screen if debugging mode is on.


    • text: string

      Text to log

    Returns boolean

    Returns true if a debugging message was printed, false otherwise.

  • off(): false
  • Set the debugging status off.

    Returns false

    Returns the new status (always false).

  • on(): true
  • Set the debugging status on.

    Returns true

    Returns the new status (always true).

  • status(): boolean
  • Returns boolean

    Returns the current state of the debugging flag.

  • toggle(newState?: boolean): boolean
  • Set or unset the debugging flag.


    • Optional newState: boolean

      If a boolean is passed as an argument, the debugging flag is set to that value. Otherwise the flag's previous value is flipped (true to false, false to true.)

    Returns boolean

    Returns the new status of the debugging flag.

Generated using TypeDoc