mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
Node's util.promisify returns the custom promisified forms of stream.finished and stream.pipeline, which are stream/promises' functions of the same name. A const binding of promisify over the node:stream named imports or namespace members now registers that stream/promises member as the projection, so calls through the binding lower as the stream/promises call and accept the stream arguments and options it accepts. The fallback declarations gain the matching util.promisify overloads. pipeline's overload comes first: its (...streams: unknown[]) => unknown type is assignable to every other target's parameter type.