MCPcopy Create free account
hub / github.com/angular/angular / _transitionTo

Method _transitionTo

packages/zone.js/lib/zone-impl.ts:1457–1472  ·  view source on GitHub ↗
(toState: TaskState, fromState1: TaskState, fromState2?: TaskState)

Source from the content-addressed store, hash-verified

1455 }
1456
1457 _transitionTo(toState: TaskState, fromState1: TaskState, fromState2?: TaskState) {
1458 if (this._state === fromState1 || this._state === fromState2) {
1459 this._state = toState;
1460 if (toState == notScheduled) {
1461 this._zoneDelegates = null;
1462 }
1463 } else {
1464 throw new Error(
1465 `${this.type} '${
1466 this.source
1467 }': can not transition to '${toState}', expecting state '${fromState1}'${
1468 fromState2 ? " or '" + fromState2 + "'" : ''
1469 }, was '${this._state}'.`,
1470 );
1471 }
1472 }
1473
1474 public toString() {
1475 if (this.data && typeof this.data.handleId !== 'undefined') {

Callers 4

cancelScheduleRequestMethod · 0.95
runTaskMethod · 0.80
scheduleTaskMethod · 0.80
cancelTaskMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected