-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add better Transition debugging information.
Expose a few nice debugging tools when working with a transition: ```ts interface Transition { /** In non-production builds, this function will return the stack that this Transition was created within. In production builds, this function will not be present. @method debugCreationStack @return string */ debugCreationStack?: () => string | undefined; /** In non-production builds, this function will return the stack that this Transition was aborted within (or `undefined` if the Transition has not been aborted yet). In production builds, this function will not be present. @method debugAbortStack @return string */ debugAbortStack?: () => string | undefined; /** In non-production builds, this property references the Transition that _this_ Transition was derived from or `undefined` if this transition did not derive from another. In production builds, this property will not be present. @Property debugPreviousTransition @type {Transition | undefined} */ debugPreviousTransition: Maybe<Transition<T>>; } ``` --- Note: I've confirmed that Ember's build pipeline properly replaces the `if (DEBUG) {` bits with `true` and `false` as appropriate: ```js if (true /* DEBUG */ ) { var _error = new Error(`Transition creation stack`); this.debugCreationStack = () => _error.stack; this.debugPreviousTransition = previousTransition; } ```
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters