Skip to content

Commit

Permalink
refactor(router): refactor documentation withHashLocation return type (
Browse files Browse the repository at this point in the history
…angular#52016)

This improve the documentation of withHashLocation function by returning the correct type.

PR Close angular#52016
  • Loading branch information
Nicoss54 authored and atscott committed Oct 9, 2023
1 parent 753eb24 commit e25006b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions goldens/public-api/router/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ export interface RouterFeature<FeatureKind extends RouterFeatureKind> {
}

// @public
export type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature | ViewTransitionsFeature;
export type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature | ViewTransitionsFeature | RouterHashLocationFeature;

// @public
export type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.RouterHashLocationFeature>;
Expand Down Expand Up @@ -1101,7 +1101,7 @@ export function withDisabledInitialNavigation(): DisabledInitialNavigationFeatur
export function withEnabledBlockingInitialNavigation(): EnabledBlockingInitialNavigationFeature;

// @public
export function withHashLocation(): RouterConfigurationFeature;
export function withHashLocation(): RouterHashLocationFeature;

// @public
export function withInMemoryScrolling(options?: InMemoryScrollingOptions): InMemoryScrollingFeature;
Expand Down
6 changes: 3 additions & 3 deletions packages/router/src/provide_router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,11 @@ export type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.RouterHa
*
* @publicApi
*/
export function withHashLocation(): RouterConfigurationFeature {
export function withHashLocation(): RouterHashLocationFeature {
const providers = [
{provide: LocationStrategy, useClass: HashLocationStrategy},
];
return routerFeature(RouterFeatureKind.RouterConfigurationFeature, providers);
return routerFeature(RouterFeatureKind.RouterHashLocationFeature, providers);
}

/**
Expand Down Expand Up @@ -752,7 +752,7 @@ export function withViewTransitions(options?: ViewTransitionsFeatureOptions):
*/
export type RouterFeatures = PreloadingFeature|DebugTracingFeature|InitialNavigationFeature|
InMemoryScrollingFeature|RouterConfigurationFeature|NavigationErrorHandlerFeature|
ComponentInputBindingFeature|ViewTransitionsFeature;
ComponentInputBindingFeature|ViewTransitionsFeature|RouterHashLocationFeature;

/**
* The list of features as an enum to uniquely type each feature.
Expand Down

0 comments on commit e25006b

Please sign in to comment.