Skip to content

Update router microlib to improve Transition related debugging. - #19136

Merged
rwjblue merged 1 commit into
masterfrom
update-router-js
Sep 10, 2020
Merged

rwjblue merged 1 commit into
masterfrom
update-router-js

Conversation

@rwjblue

@rwjblue rwjblue commented Sep 9, 2020 •

Copy link
Copy Markdown
Member

Exposes a few new methods / properties on Transition instances during
debugging (but not in production):

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>>;
}

From emberjs/router.js#305

@rwjblue
rwjblue merged commit 27d547d into master Sep 10, 2020
@rwjblue
rwjblue deleted the update-router-js branch September 10, 2020 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants