Skip to content

Unclear type alias shown for node parameter hint #32493

Closed
@mjbvz

Description

@mjbvz

From microsoft/vscode#76957
TypeScript Version: [email protected]

Search Terms:

  • d.ts
  • quick info
  • hover

Code

For the following javascript, trigger parameter hints on createServer

const http = require('http'); 
http.createServer(

Expected behavior:
The function signature of first parameter is shown.

Actual behavior:
We show a type alias: http.RequestListener. Node defines this type as:

    type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions