diff options
Diffstat (limited to 'js/console.ts')
-rw-r--r-- | js/console.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/console.ts b/js/console.ts index 7e4f3e579..d43605152 100644 --- a/js/console.ts +++ b/js/console.ts @@ -182,26 +182,35 @@ export class Console { // @internal constructor(private printFunc: PrintFunc) {} + /** Writes the arguments to stdout */ // tslint:disable-next-line:no-any log = (...args: any[]): void => { this.printFunc(stringifyArgs(args)); }; + /** Writes the arguments to stdout */ debug = this.log; + /** Writes the arguments to stdout */ info = this.log; + /** Writes the properties of the supplied `obj` to stdout */ // tslint:disable-next-line:no-any dir = (obj: any, options: ConsoleOptions = {}) => { this.printFunc(stringifyArgs([obj], options)); }; + /** Writes the arguments to stdout */ // tslint:disable-next-line:no-any warn = (...args: any[]): void => { this.printFunc(stringifyArgs(args), true); }; + /** Writes the arguments to stdout */ error = this.warn; + /** Writes an error message to stdout if the assertion is `false`. If the + * assertion is `true`, nothing happens. + */ // tslint:disable-next-line:no-any assert = (condition: boolean, ...args: any[]): void => { if (!condition) { |