diff --git a/types/node/inspector.d.ts b/types/node/inspector.d.ts index 5f25a7d6bd..8abee3951f 100644 --- a/types/node/inspector.d.ts +++ b/types/node/inspector.d.ts @@ -3251,7 +3251,7 @@ declare module "inspector" { function close(): void; /** - * Return the URL of the active inspector, or undefined if there is none. + * Return the URL of the active inspector, or `undefined` if there is none. */ - function url(): string; + function url(): string | undefined; } diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 69981a7722..d5fe429815 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -1090,7 +1090,7 @@ import * as constants from 'constants'; inspector.open(0, 'localhost'); inspector.open(0, 'localhost', true); inspector.close(); - const inspectorUrl: string = inspector.url(); + const inspectorUrl: string | undefined = inspector.url(); const session = new inspector.Session(); session.connect(); diff --git a/types/node/scripts/generate-inspector/inspector.d.ts.template b/types/node/scripts/generate-inspector/inspector.d.ts.template index a6715f12e4..5b6a02cbb2 100644 --- a/types/node/scripts/generate-inspector/inspector.d.ts.template +++ b/types/node/scripts/generate-inspector/inspector.d.ts.template @@ -73,7 +73,7 @@ declare module "inspector" { function close(): void; /** - * Return the URL of the active inspector, or undefined if there is none. + * Return the URL of the active inspector, or `undefined` if there is none. */ - function url(): string; + function url(): string | undefined; } diff --git a/types/node/v10/inspector.d.ts b/types/node/v10/inspector.d.ts index 2dcd2760ad..9e1eea4b21 100644 --- a/types/node/v10/inspector.d.ts +++ b/types/node/v10/inspector.d.ts @@ -3156,7 +3156,7 @@ declare module "inspector" { function close(): void; /** - * Return the URL of the active inspector, or undefined if there is none. + * Return the URL of the active inspector, or `undefined` if there is none. */ - function url(): string; + function url(): string | undefined; } diff --git a/types/node/v10/node-tests.ts b/types/node/v10/node-tests.ts index 22dab935f2..417689bc88 100644 --- a/types/node/v10/node-tests.ts +++ b/types/node/v10/node-tests.ts @@ -4822,7 +4822,7 @@ import * as constants from 'constants'; inspector.open(0, 'localhost'); inspector.open(0, 'localhost', true); inspector.close(); - const inspectorUrl: string = inspector.url(); + const inspectorUrl: string | undefined = inspector.url(); const session = new inspector.Session(); session.connect(); diff --git a/types/node/v11/inspector.d.ts b/types/node/v11/inspector.d.ts index 5f25a7d6bd..8abee3951f 100644 --- a/types/node/v11/inspector.d.ts +++ b/types/node/v11/inspector.d.ts @@ -3251,7 +3251,7 @@ declare module "inspector" { function close(): void; /** - * Return the URL of the active inspector, or undefined if there is none. + * Return the URL of the active inspector, or `undefined` if there is none. */ - function url(): string; + function url(): string | undefined; } diff --git a/types/node/v11/node-tests.ts b/types/node/v11/node-tests.ts index 69981a7722..d5fe429815 100644 --- a/types/node/v11/node-tests.ts +++ b/types/node/v11/node-tests.ts @@ -1090,7 +1090,7 @@ import * as constants from 'constants'; inspector.open(0, 'localhost'); inspector.open(0, 'localhost', true); inspector.close(); - const inspectorUrl: string = inspector.url(); + const inspectorUrl: string | undefined = inspector.url(); const session = new inspector.Session(); session.connect(); diff --git a/types/node/v8/inspector.d.ts b/types/node/v8/inspector.d.ts index 19bba5af01..8deb30592c 100644 --- a/types/node/v8/inspector.d.ts +++ b/types/node/v8/inspector.d.ts @@ -2506,7 +2506,7 @@ declare module "inspector" { export function close(): void; /** - * Return the URL of the active inspector, or undefined if there is none. + * Return the URL of the active inspector, or `undefined` if there is none. */ - export function url(): string; + export function url(): string | undefined; } diff --git a/types/node/v8/node-tests.ts b/types/node/v8/node-tests.ts index 27040c939d..a6b671550f 100644 --- a/types/node/v8/node-tests.ts +++ b/types/node/v8/node-tests.ts @@ -4041,7 +4041,7 @@ namespace inspector_tests { inspector.open(0, 'localhost'); inspector.open(0, 'localhost', true); inspector.close(); - const inspectorUrl: string = inspector.url(); + const inspectorUrl: string | undefined = inspector.url(); const session = new inspector.Session(); session.connect(); diff --git a/types/node/v9/inspector.d.ts b/types/node/v9/inspector.d.ts index 7088455c8c..b538c4108d 100644 --- a/types/node/v9/inspector.d.ts +++ b/types/node/v9/inspector.d.ts @@ -2524,7 +2524,7 @@ declare module "inspector" { export function close(): void; /** - * Return the URL of the active inspector, or undefined if there is none. + * Return the URL of the active inspector, or `undefined` if there is none. */ - export function url(): string; + export function url(): string | undefined; } diff --git a/types/node/v9/node-tests.ts b/types/node/v9/node-tests.ts index d51d13d655..d3e55de398 100644 --- a/types/node/v9/node-tests.ts +++ b/types/node/v9/node-tests.ts @@ -4106,7 +4106,7 @@ namespace inspector_tests { inspector.open(0, 'localhost'); inspector.open(0, 'localhost', true); inspector.close(); - const inspectorUrl: string = inspector.url(); + const inspectorUrl: string | undefined = inspector.url(); const session = new inspector.Session(); session.connect();