refactor(core): Removed readonly getters and changed to readonly (#19225)
variables
This commit is contained in:

committed by
Victor Berchet

parent
3aa3d5c548
commit
2b84b86fc0
@ -117,6 +117,7 @@ export class ZoneMacroTaskConnection extends ZoneMacroTaskWrapper<Request, Respo
|
||||
Connection {
|
||||
response: Observable<Response>;
|
||||
lastConnection: Connection;
|
||||
readonly readyState: ReadyState;
|
||||
|
||||
constructor(public request: Request, private backend: XHRBackend) {
|
||||
super();
|
||||
@ -126,12 +127,10 @@ 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