Skip to content

Commit 408491b

Browse files
doc(TransitionHook): Improve inline comments
1 parent d456d54 commit 408491b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/transition/transitionHook.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export class TransitionHook {
7070
let options = this.options;
7171
trace.traceHookInvocation(this, this.transition, options);
7272

73+
// A new transition started before this hook (from a previous transition) could be run.
7374
if (this.rejectIfSuperseded()) {
7475
return Rejection.superseded(options.current()).toPromise();
7576
}
@@ -113,7 +114,7 @@ export class TransitionHook {
113114

114115
// Hook returned a promise
115116
if (isPromise(result)) {
116-
// Wait for the promise, then reprocess the resolved value
117+
// Wait for the promise, then reprocess the settled promise value
117118
return result.then(this.handleHookResult.bind(this));
118119
}
119120

@@ -128,7 +129,7 @@ export class TransitionHook {
128129
const isTargetState = is(TargetState);
129130
// hook returned a TargetState
130131
if (isTargetState(result)) {
131-
// Halt the current Transition and start a redirected Transition (to the TargetState).
132+
// Halt the current Transition and redirect (a new Transition) to the TargetState.
132133
return Rejection.redirected(result).toPromise();
133134
}
134135
}

0 commit comments

Comments
 (0)