Revert "refactor(core): Removed readonly getters and changed to readonly (#19225)"
This reverts commit 2b84b86fc0
.
This commit is contained in:
@ -117,7 +117,6 @@ export class ZoneMacroTaskConnection extends ZoneMacroTaskWrapper<Request, Respo
|
||||
Connection {
|
||||
response: Observable<Response>;
|
||||
lastConnection: Connection;
|
||||
readonly readyState: ReadyState;
|
||||
|
||||
constructor(public request: Request, private backend: XHRBackend) {
|
||||
super();
|
||||
@ -127,10 +126,12 @@ export class ZoneMacroTaskConnection extends ZoneMacroTaskWrapper<Request, Respo
|
||||
|
||||
delegate(request: Request): Observable<Response> {
|
||||
this.lastConnection = this.backend.createConnection(request);
|
||||
(this as{readyState: ReadyState}).readyState =
|
||||
!!this.lastConnection ? this.lastConnection.readyState : ReadyState.Unsent;
|
||||
return this.lastConnection.response as Observable<Response>;
|
||||
}
|
||||
|
||||
get readyState(): ReadyState {
|
||||
return !!this.lastConnection ? this.lastConnection.readyState : ReadyState.Unsent;
|
||||
}
|
||||
}
|
||||
|
||||
export class ZoneMacroTaskBackend implements ConnectionBackend {
|
||||
|
Reference in New Issue
Block a user