Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion goldens/public-api/router/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { SimpleChanges } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Type } from '@angular/core';
import { Version } from '@angular/core';
import { WritableResource } from '@angular/core';

// @public
export class ActivatedRoute {
Expand Down Expand Up @@ -675,7 +676,7 @@ export interface ResourceContext {
}

// @public
export type ResourceResult = Record<string, Resource<unknown>>;
export type ResourceResult = Record<string, Resource<unknown> & Pick<WritableResource<unknown>, 'reload'>>;

// @public
export interface Route {
Expand Down
1 change: 1 addition & 0 deletions goldens/public-api/router/testing/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { Resource } from '@angular/core';
import { Signal } from '@angular/core';
import { SimpleChanges } from '@angular/core';
import { Type } from '@angular/core';
import { WritableResource } from '@angular/core';
import { WritableSignal } from '@angular/core';

// @public
Expand Down
6 changes: 5 additions & 1 deletion packages/router/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
Signal,
Type,
Resource,
WritableResource,
} from '@angular/core';
import {Observable} from 'rxjs';
export {DefaultExport} from '@angular/core';
Expand All @@ -28,7 +29,10 @@ import type {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';
* The expected return type of a `resources` function.
* @developerPreview 22.2
*/
export type ResourceResult = Record<string, Resource<unknown>>;
export type ResourceResult = Record<
string,
Resource<unknown> & Pick<WritableResource<unknown>, 'reload'>
>;

// Developer notes: properties are exposed as a plain Record (`Params`) rather than a `ParamMap`
// to allow future type-check layers to infer exact keys (e.g., `{ id: string }`).
Expand Down
Loading
Loading