Skip to content

missing @types/stream-http ? #122

@leolivier

Description

@leolivier

Hi,
disclaimer: not an expert in JS !
I can't find anywhere the typescript declarations of stream-http.
I used the @types/node for getting the definitions of standard types like IncomingMessage but I'd like to be able to write

import { streamHttp } from "stream-http";

and currently I'm forced to write

const streamHttp = require("stream-http");

and the type of streamHttp is any...

I tried just adding a module declaration like this in my own shims-vue.d.ts:

declare module "stream-http";

but it does not provide any typing.

Is there a way to have a true TS declaration for that?

EDIT: I saw the e.g. the request or get functions are described at the same place as IncomingMessage but how to "map" the stream-http module on the http module ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions