Skip to content

Commit

Permalink
Attributes before methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Jul 14, 2019
1 parent 533db63 commit 4bddf0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/promise-writable.ts
Expand Up @@ -20,6 +20,10 @@ export class PromiseWritable<TWritable extends WritableStream> {

_errored?: Error

private errorHandler = (err: Error): void => {
this._errored = err
}

constructor(readonly stream: TWritable) {
stream.on("error", this.errorHandler)
}
Expand Down Expand Up @@ -281,10 +285,6 @@ export class PromiseWritable<TWritable extends WritableStream> {
}
}
}

private errorHandler = (err: Error): void => {
this._errored = err
}
}

export default PromiseWritable

0 comments on commit 4bddf0e

Please sign in to comment.