mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
87bc47b3bf
Contributing toward #24236 - Swapped `Object.assign` for `ObjectAssign` primordial. - Removed referencing TODO comment. Please disregard if no longer desired.
42 lines
931 B
TypeScript
42 lines
931 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
import { primordials } from "ext:core/mod.js";
|
|
import { Console } from "ext:deno_node/internal/console/constructor.mjs";
|
|
import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope_shared.js";
|
|
// Don't rely on global `console` because during bootstrapping, it is pointing
|
|
// to native `console` object provided by V8.
|
|
const console = windowOrWorkerGlobalScope.console.value;
|
|
|
|
const { ObjectAssign } = primordials;
|
|
|
|
ObjectAssign(console, { Console });
|
|
|
|
export default console;
|
|
|
|
export { Console };
|
|
export const {
|
|
assert,
|
|
clear,
|
|
count,
|
|
countReset,
|
|
debug,
|
|
dir,
|
|
dirxml,
|
|
error,
|
|
group,
|
|
groupCollapsed,
|
|
groupEnd,
|
|
info,
|
|
log,
|
|
profile,
|
|
profileEnd,
|
|
table,
|
|
time,
|
|
timeEnd,
|
|
timeLog,
|
|
timeStamp,
|
|
trace,
|
|
warn,
|
|
} = console;
|
|
// deno-lint-ignore no-explicit-any
|
|
export const indentLevel = (console as any)?.indentLevel;
|