Skip to main content
Branch: Development

Utils

Index

Classes

ConsoleCommand

ConsoleCommand:

constructor

  • new ConsoleCommand(name: string, callback: (...args: string[]) => void): ConsoleCommand

publicdestroy

  • destroy(): void

EveryTick

EveryTick:

constructor

  • new EveryTick(callback: () => void): EveryTick

publicreadonlyid

id: number

publicdestroy

  • destroy(): void

Interval

Interval:

constructor

  • new Interval(callback: () => void, ms: number): Interval

publicreadonlyid

id: number

publicdestroy

  • destroy(): void

NextTick

NextTick:

constructor

  • new NextTick(callback: () => void): NextTick

publicreadonlyid

id: number

publicdestroy

  • destroy(): void

Timeout

Timeout:

constructor

  • new Timeout(callback: () => void, ms: number): Timeout

publicreadonlyid

id: number

publicdestroy

  • destroy(): void

Timer

Timer:

constructor

  • new Timer(callback: () => void, ms: number, once: boolean): Timer

publicreadonlyid

id: number

publicdestroy

  • destroy(): void

Functions

assert

  • assert(assertion: unknown, message?: string): asserts assertion

inspect

  • inspect(value: unknown, options?: IInspectOptions): string
  • Returns a string representation of value that is intended for debugging.

    Remarks

    Proxy or promise details (returned value, status) are not supported.

wait

  • wait(timeout: number): Promise<void>

waitFor

  • waitFor(callback: () => boolean, timeout?: number): Promise<void>
  • Waits for the callback to return true, otherwise the promise will be rejected after timeout