Skip to content

Latest commit

 

History

History
106 lines (74 loc) · 3.48 KB

console.md

File metadata and controls

106 lines (74 loc) · 3.48 KB

clear (function)

Prints special ANSI escape characters to stdout which instruct your terminal emulator to clear the screen and clear your terminal scrollback.

Identical to console.clear.

declare function clear(): void;

Console (interface)

interface Console {
  log(message?: any, ...optionalParams: any[]): void;
  info(message?: any, ...optionalParams: any[]): void;
  warn(message?: any, ...optionalParams: any[]): void;
  error(message?: any, ...optionalParams: any[]): void;
  clear(): void;
}

Console.log (method)

Logs its arguments to stdout, with a newline appended.

Any value can be logged, not just strings. Non-string values will be formatted using inspect.

Functionally identical to console.info, echo, and print. Contrast with console.error, which prints to stderr instead of stdout.

log(message?: any, ...optionalParams: any[]): void;

Console.info (method)

Logs its arguments to stdout, with a newline appended.

Any value can be logged, not just strings. Non-string values will be formatted using inspect.

Functionally identical to console.log, echo, and print. Contrast with console.error, which prints to stderr instead of stdout.

info(message?: any, ...optionalParams: any[]): void;

Console.warn (method)

Logs its arguments to stderr, with a newline appended.

Any value can be logged, not just strings. Non-string values will be formatted using inspect.

Functionally identical to console.error. Contrast with console.log, which prints to stdout instead of stderr.

warn(message?: any, ...optionalParams: any[]): void;

Console.error (method)

Logs its arguments to stderr, with a newline appended.

Any value can be logged, not just strings. Non-string values will be formatted using inspect.

Functionally identical to console.warn. Contrast with console.log, which prints to stdout instead of stderr.

error(message?: any, ...optionalParams: any[]): void;

Console.clear (method)

Prints special ANSI escape characters to stdout which instruct your terminal emulator to clear the screen and clear your terminal scrollback.

Identical to clear.

clear(): void;

console (Console)

var console: Console;