diff --git a/packages/@ember/-internals/routing/lib/services/router.ts b/packages/@ember/-internals/routing/lib/services/router.ts index 8f45696391c..2742e390c0f 100644 --- a/packages/@ember/-internals/routing/lib/services/router.ts +++ b/packages/@ember/-internals/routing/lib/services/router.ts @@ -293,8 +293,8 @@ if (EMBER_ROUTING_ROUTER_SERVICE) { }); }, - /** - A RouteInfo that represents the current leaf route. + /** + A `RouteInfo` that represents the current leaf route. It is guaranteed to change whenever a route transition happens (even when that transition only changes parameters and doesn't change the active route) diff --git a/packages/@ember/-internals/routing/lib/system/route-info.ts b/packages/@ember/-internals/routing/lib/system/route-info.ts index 0247eb1b4c6..208513b9e65 100644 --- a/packages/@ember/-internals/routing/lib/system/route-info.ts +++ b/packages/@ember/-internals/routing/lib/system/route-info.ts @@ -42,7 +42,7 @@ /** The ordered list of the names of the params required for this route. It will contain the same - strings as Object.keys(params), but here the order + strings as `Object.keys(params)`, but here the order is significant. This allows users to correctly pass params into routes programmatically. @property {Array} paramNames @@ -153,9 +153,9 @@ */ /** - The values of the route's parametes. These are the + The values of the route's parameters. These are the same params that are received as arguments to the - route's model hook. Contains only the parameters + route's `model` hook. Contains only the parameters valid for this route, if any (params for parent or child routes are not merged). @property {Object} params @@ -182,7 +182,7 @@ */ /** - A reference to the parent route's RouteInfo. + A reference to the parent route's `RouteInfo`. This can be used to traverse upward to the topmost `RouteInfo`. @property {RouteInfo|null} parent @@ -191,7 +191,7 @@ */ /** - A reference to the child route's RouteInfo. + A reference to the child route's `RouteInfo`. This can be used to traverse downward to the leafmost `RouteInfo`. @property {RouteInfo|null} child @@ -202,7 +202,9 @@ of `RouteInfo`s from the topmost to leafmost. Returns the first `RouteInfo` in the linked list for which the callback returns true. +*/ +/** This method is similar to the `find()` method defined in ECMAScript 2015. diff --git a/packages/@ember/-internals/routing/lib/system/transition.ts b/packages/@ember/-internals/routing/lib/system/transition.ts index 109d7ef2c92..22902ac962d 100644 --- a/packages/@ember/-internals/routing/lib/system/transition.ts +++ b/packages/@ember/-internals/routing/lib/system/transition.ts @@ -138,7 +138,7 @@ * This property is a `RouteInfo` object that represents * where the router is transitioning to. It's important * to note that a `RouteInfo` is a linked list and this - * property is simply represents leafmost route. + * property represents the leafmost route. * @property {RouteInfo|RouteInfoWithAttributes} to * @public * @category ember-routing-router-service @@ -148,8 +148,8 @@ * This property is a `RouteInfo` object that represents * where transition originated from. It's important * to note that a `RouteInfo` is a linked list and this - * property is simply represents head node of the list. - * In the case of an initial render, from will be set to + * property represents the head node of the list. + * In the case of an initial render, `from` will be set to * `null`. * @property {RouteInfoWithAttributes} from * @public