D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
etb1lp46s9ed
/
www
/
wabot.delyntro.com
/
node_modules
/
pino
/
test
/
fixtures
/
ts
/
Filename :
to-file-transport.ts
back
Copy
import * as fs from 'node:fs' import { once } from 'node:events' async function run (opts: { destination?: fs.PathLike }): Promise<fs.WriteStream> { if (!opts.destination) throw new Error('kaboom') const stream = fs.createWriteStream(opts.destination, { encoding: 'utf8' }) await once(stream, 'open') return stream } export default run