MCPcopy
hub / github.com/angular/angular / _transitionTo

Method _transitionTo

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

Source from the content-addressed store, hash-verified

1460 }
1461
1462 _transitionTo(toState: TaskState, fromState1: TaskState, fromState2?: TaskState) {
1463 if (this._state === fromState1 || this._state === fromState2) {
1464 this._state = toState;
1465 if (toState == notScheduled) {
1466 this._zoneDelegates = null;
1467 }
1468 } else {
1469 throw new Error(
1470 `${this.type} '${
1471 this.source
1472 }': can not transition to '${toState}', expecting state '${fromState1}'${
1473 fromState2 ? " or '" + fromState2 + "'" : ''
1474 }, was '${this._state}'.`,
1475 );
1476 }
1477 }
1478
1479 public toString() {
1480 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