Skip to content

getItemContent GitApi return type is incorrect #638

Open
@thumbsupep

Description

@thumbsupep

https://github.com/microsoft/azure-devops-node-api/blob/master/api/GitApi.ts#L75

The promise return type for the method linked above does not resolve to a NodeJS.ReadableStream (web stream)
It is of type Readable from Node's stream.

Given this implementation of getItemContent: https://github.com/microsoft/azure-devops-node-api/blob/master/api/GitApi.ts#L3006C7-L3062C1
since http is hm.HttpClient where hm is * from typed-rest-client/HttpClient, then res.message is NOT a Web Stream.
It is specifically a Node.js http.IncomingMessage object, which is a type of Node.js Readable stream.

NodeJS.ReadableStream type: https://nodejs.org/docs/latest-v22.x/api/webstreams.html#class-readablestream
Readable type: https://nodejs.org/docs/latest-v22.x/api/stream.html#class-streamreadable

I understand this is generated code though, so where do I go to fix the type?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions