Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Node-like console.log()ing #1294

Merged
merged 8 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/node/internal/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import { spliceOne } from "node-internal:internal_utils";
import { default as async_hooks } from "node-internal:async_hooks";
const { AsyncResource } = async_hooks;

import { inspect } from "node-internal:internal_inspect";

const kRejection = Symbol.for("nodejs.rejection");
const kCapture = Symbol("kCapture");
const kErrorMonitor = Symbol("events.errorMonitor");
Expand Down Expand Up @@ -339,9 +341,7 @@ EventEmitter.prototype.emit = function emit(type : string | symbol, ...args: any

let stringifiedEr;
try {
stringifiedEr = `${er}`;
// TODO(soon): Implement inspect
// stringifiedEr = inspect(er);
stringifiedEr = inspect(er);
} catch {
stringifiedEr = er;
}
Expand Down
Loading
Loading