Bun

interface

console.default.Console

interface Console

  • readonly Console: {new (stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean) => Console; new (options: ConsoleOptions) => Console}
  • condition?: unknown,
    ...data: any[]
    ): void;
  • clear(): void;
  • label?: string
    ): void;
  • label?: string
    ): void;
  • ...data: any[]
    ): void;
  • item?: any,
    options?: InspectOptions
    ): void;
  • ...data: any[]
    ): void;
  • ...data: any[]
    ): void;
  • ...data: any[]
    ): void;
  • ...data: any[]
    ): void;
  • groupEnd(): void;
  • ...data: any[]
    ): void;
  • ...data: any[]
    ): void;
  • label?: string
    ): void;

    This method does not display anything unless used in the inspector. The console.profile() method starts a JavaScript CPU profile with an optional label until profileEnd is called. The profile is then added to the Profile panel of the inspector.

    console.profile('MyLabel');
    // Some code
    console.profileEnd('MyLabel');
    // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
    
  • label?: string
    ): void;

    This method does not display anything unless used in the inspector. Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. See profile for an example.

    If this method is called without a label, the most recently started profile is stopped.

  • tabularData?: any,
    properties?: string[]
    ): void;
  • label?: string
    ): void;
  • label?: string
    ): void;
  • label?: string,
    ...data: any[]
    ): void;
  • label?: string
    ): void;

    This method does not display anything unless used in the inspector. The console.timeStamp() method adds an event with the label 'label' to the Timeline panel of the inspector.

  • ...data: any[]
    ): void;
  • ...data: any[]
    ): void;