A wrapper around the built-in console object. Supports logging strings, as well as objects, arrays, and typed arrays.

Example

Console.log("test"); // "test"

const bytes = Bytes.fromUtf8String("hello seda");
Console.log(bytes); // '{"type":"hex","value":"68656c6c6f2073656461"}'

const typedArray = new Uint8Array(5);
Console.log(typedArray); // "TypedArray(0000000000)"

@json
class Response {
value!: string;
}

const response = JSON.parse<Response>('{"value":"5""}');
Console.log(response); // '{"value":"5"}'

Methods

  • Type Parameters

    • T = string

    Parameters

    • message: T

    Returns void

  • Type Parameters

    • T = string

    Parameters

    • message: T

    Returns void

  • Type Parameters

    • T = string

    Parameters

    • message: T

    Returns void

  • Type Parameters

    • T = string

    Parameters

    • message: T

    Returns void

  • Type Parameters

    • T = string

    Parameters

    • message: T

    Returns void