Permalink
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (6 sloc) 234 Bytes
import { Writable } from "stream"
export function end(endable: Writable, contents?: string): Promise<void> {
return new Promise<void>(resolve => {
contents == null ? endable.end(resolve) : endable.end(contents, resolve)
})
}