1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-06 06:19:05 -05:00

fix(node): Add missing inspector/promises (#27491)

Add missing `inspector/promises` in node builtin module list, that
causes types checking error.
This commit is contained in:
Je Xia 2024-12-31 18:06:21 +08:00 committed by GitHub
parent a844d96ee9
commit 7b491a28df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 0 deletions

View file

@ -136063,6 +136063,7 @@ var unprefixedNodeCoreModuleList = [
"https",
"http2",
"inspector",
"inspector/promises",
"module",
"net",
"os",

View file

@ -57,6 +57,7 @@ generate_builtin_node_module_lists! {
"http2",
"https",
"inspector",
"inspector/promises",
"module",
"net",
"os",

View file

@ -8712,6 +8712,7 @@ fn lsp_completions_node_specifier() {
"node:http2",
"node:https",
"node:inspector",
"node:inspector/promises",
"node:module",
"node:net",
"node:os",

View file

@ -1,5 +1,8 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import inspector, { Session } from "node:inspector";
import inspectorPromises, {
Session as SessionPromise,
} from "node:inspector/promises";
import { assertEquals } from "@std/assert/equals";
Deno.test("[node/inspector] - importing inspector works", () => {
@ -9,3 +12,11 @@ Deno.test("[node/inspector] - importing inspector works", () => {
Deno.test("[node/inspector] - Session constructor should not throw", () => {
new Session();
});
Deno.test("[node/inspector/promises] - importing inspector works", () => {
assertEquals(typeof inspectorPromises.open, "function");
});
Deno.test("[node/inspector/promises] - Session constructor should not throw", () => {
new SessionPromise();
});