refactor: initialize member variables directly (#34046)
This commit is contained in:
parent
4fad376b0e
commit
2091343b78
1 changed files with 3 additions and 6 deletions
|
@ -36,17 +36,14 @@ const discardableDuplicateHeaders = new Set([
|
|||
]);
|
||||
|
||||
class IncomingMessage extends Readable {
|
||||
_shouldPush: boolean;
|
||||
_data: (Buffer | null)[];
|
||||
_shouldPush: boolean = false;
|
||||
_data: (Buffer | null)[] = [];
|
||||
_responseHead: NodeJS.ResponseHead;
|
||||
_resume: (() => void) | null;
|
||||
_resume: (() => void) | null = null;
|
||||
|
||||
constructor (responseHead: NodeJS.ResponseHead) {
|
||||
super();
|
||||
this._shouldPush = false;
|
||||
this._data = [];
|
||||
this._responseHead = responseHead;
|
||||
this._resume = null;
|
||||
}
|
||||
|
||||
get statusCode () {
|
||||
|
|
Loading…
Reference in a new issue