fix: remove "stream" dependency in browser bundles, #396

This commit is contained in:
harttle
2021-10-03 21:21:35 +08:00
parent 68c4cfcfb6
commit 3b5eb6664f
2 changed files with 28 additions and 15 deletions
+12
View File
@@ -0,0 +1,12 @@
import { Emitter } from './emitter'
export class StreamedEmitter implements Emitter {
public buffer = '';
public stream: NodeJS.ReadableStream = null as any
constructor () {
throw new Error('streaming not supported in browser')
}
public write: (html: any) => void
public error: (err: Error) => void
public end: () => void
}