summaryrefslogtreecommitdiff
path: root/js/console.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/console.ts')
-rw-r--r--js/console.ts5
1 files changed, 2 insertions, 3 deletions
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;