diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/console.ts | 5 | ||||
-rw-r--r-- | js/libdeno.ts | 2 |
2 files changed, 3 insertions, 4 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; diff --git a/js/libdeno.ts b/js/libdeno.ts index 142d779c2..8445a2d2b 100644 --- a/js/libdeno.ts +++ b/js/libdeno.ts @@ -8,7 +8,7 @@ interface Libdeno { send(msg: ArrayBufferView): null | Uint8Array; - print(x: string): void; + print(x: string, isErr?: boolean): void; setGlobalErrorHandler: ( handler: ( |