add hw2
This commit is contained in:
14
node_modules/pino/test/fixtures/ts/transport-worker.ts
generated
vendored
Normal file
14
node_modules/pino/test/fixtures/ts/transport-worker.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Writable } from 'stream'
|
||||
|
||||
export default (): Writable => {
|
||||
const myTransportStream = new Writable({
|
||||
autoDestroy: true,
|
||||
write (chunk, _enc, cb) {
|
||||
console.log(chunk.toString())
|
||||
cb()
|
||||
},
|
||||
defaultEncoding: 'utf8'
|
||||
})
|
||||
|
||||
return myTransportStream
|
||||
}
|
||||
Reference in New Issue
Block a user