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:
parent
a844d96ee9
commit
7b491a28df
4 changed files with 14 additions and 0 deletions
1
cli/tsc/00_typescript.js
vendored
1
cli/tsc/00_typescript.js
vendored
|
@ -136063,6 +136063,7 @@ var unprefixedNodeCoreModuleList = [
|
|||
"https",
|
||||
"http2",
|
||||
"inspector",
|
||||
"inspector/promises",
|
||||
"module",
|
||||
"net",
|
||||
"os",
|
||||
|
|
|
@ -57,6 +57,7 @@ generate_builtin_node_module_lists! {
|
|||
"http2",
|
||||
"https",
|
||||
"inspector",
|
||||
"inspector/promises",
|
||||
"module",
|
||||
"net",
|
||||
"os",
|
||||
|
|
|
@ -8712,6 +8712,7 @@ fn lsp_completions_node_specifier() {
|
|||
"node:http2",
|
||||
"node:https",
|
||||
"node:inspector",
|
||||
"node:inspector/promises",
|
||||
"node:module",
|
||||
"node:net",
|
||||
"node:os",
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue