refactor: initialize member variables directly (#34046)

This commit is contained in:
Milan Burda 2022-05-04 16:30:05 +02:00 committed by GitHub
parent 4fad376b0e
commit 2091343b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 () {