aboutsummaryrefslogtreecommitdiff
path: root/src/js/node/diagnostics_channel.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/node/diagnostics_channel.js')
-rw-r--r--src/js/node/diagnostics_channel.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/js/node/diagnostics_channel.js b/src/js/node/diagnostics_channel.js
new file mode 100644
index 000000000..72eb47d2e
--- /dev/null
+++ b/src/js/node/diagnostics_channel.js
@@ -0,0 +1,38 @@
+// Hardcoded module "node:diagnostics_channel"
+// This is a stub! None of this is actually implemented yet.
+
+import { hideFromStack, throwNotImplemented } from "../shared";
+
+class Channel {
+ constructor(name) {
+ throwNotImplemented("node:diagnostics_channel", 2688);
+ }
+}
+
+function channel() {
+ throwNotImplemented("node:diagnostics_channel", 2688);
+}
+
+function hasSubscribers() {
+ throwNotImplemented("node:diagnostics_channel", 2688);
+}
+function subscribe() {
+ throwNotImplemented("node:diagnostics_channel", 2688);
+}
+
+function unsubscribe() {
+ throwNotImplemented("node:diagnostics_channel", 2688);
+}
+
+const defaultObject = {
+ channel,
+ hasSubscribers,
+ subscribe,
+ unsubscribe,
+ Channel,
+ [Symbol.for("CommonJS")]: 0,
+};
+
+export { defaultObject as default, Channel, channel, hasSubscribers, subscribe, unsubscribe };
+
+hideFromStack([channel, hasSubscribers, subscribe, unsubscribe, Channel]);