Options
All
  • Public
  • Public/Protected
  • All
Menu

Tabletop Playground API

Index

Type aliases

interval_handle

interval_handle: any

Handle that identifies an active interval

timeout_handle

timeout_handle: any

Handle that identifies an active timeout

Variables

$uncaughtException

$uncaughtException: ((error: string) => void) | undefined

Global exception handler: called with the error message whenever an unhandled exception occurs. Set to a function to use, for example:

$uncaughtException = (err) => console.log(err);

process

process: Process

Functions

clearAllIntervals

  • clearAllIntervals(): void
  • Cancel all active intervals. Warning: Using this function can lead to complex bugs when used in a script. Prefer to cancel single intervals using clearInterval instead.

    Returns void

clearAllTimeouts

  • clearAllTimeouts(): void
  • Cancel all timeouts that have not been executed yet. Warning: Using this function can lead to complex bugs when used in a script. Prefer to cancel single timeouts using clearTimeout instead.

    Returns void

clearInterval

clearTimeout

gc

  • gc(): void
  • Force garbage collection

    Returns void

setInterval

  • setInterval(fn: (...args: any[]) => void, delay: number, ...args: any[]): interval_handle
  • Execute a function repeatedly after a fixed delay in milliseconds. Additional arguments are passed through to the function.

    Parameters

    • fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • delay: number
    • Rest ...args: any[]

    Returns interval_handle

setTimeout

  • setTimeout(fn: (...args: any[]) => void, timeout: number, ...args: any[]): timeout_handle
  • Execute a function after a timeout in milliseconds. Additional arguments are passed through to the function.

    Parameters

    • fn: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • timeout: number
    • Rest ...args: any[]

    Returns timeout_handle