From f156a86024fc98e63f42c1c7acccac0af10950ef Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Tue, 25 Sep 2018 01:27:02 -0400 Subject: console.warn goes to stderr (#810) --- js/console.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'js/console.ts') diff --git a/js/console.ts b/js/console.ts index c4c36e7b2..00a24e83c 100644 --- a/js/console.ts +++ b/js/console.ts @@ -110,7 +110,7 @@ export function stringifyArgs(args: any[]): string { return out.join(" "); } -type PrintFunc = (x: string) => void; +type PrintFunc = (x: string, isErr?: boolean) => void; export class Console { constructor(private printFunc: PrintFunc) {} @@ -125,8 +125,7 @@ export class Console { // tslint:disable-next-line:no-any warn(...args: any[]): void { - // TODO Log to stderr. - this.printFunc(stringifyArgs(args)); + this.printFunc(stringifyArgs(args), true); } error = this.warn; -- cgit v1.2.3