Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@antongolub
Copy link
Collaborator

Fixes #1208

expectType<Writable & PromiseLike<ProcessOutput & Writable>>(p.pipe('file'))
  • Tests pass
  • Appropriate changes to README are included in PR

@antongolub antongolub requested a review from Copilot May 6, 2025 18:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the type declaration for the pipe method when a file string parameter is used. It adds a new overload for pipe(file: string) and updates related return types in the ProcessPromise class to ensure proper type inference.

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

File Description
test-d/core.test-d.ts Adds a unit test verifying the new pipe(file: string) return type.
src/core.ts Introduces the PromisifiedStream type alias and updates pipe overloads to correctly return PromisifiedStream for file and Writable inputs.
Files not reviewed (2)
  • .size-limit.json: Language not supported
  • package.json: Language not supported

@antongolub antongolub requested a review from antonmedv May 6, 2025 18:41
@antongolub antongolub merged commit b6dc220 into google:main May 6, 2025
28 checks passed
@antongolub antongolub deleted the fix-pipe-api-types branch May 6, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing a filename directly to pipe results in a type error in TypeScript

1 participant