diff --git a/packages/angular/src/runtime/nx/data-persistence.ts b/packages/angular/src/runtime/nx/data-persistence.ts index 86fbdf3eae..1da0bb4dcd 100644 --- a/packages/angular/src/runtime/nx/data-persistence.ts +++ b/packages/angular/src/runtime/nx/data-persistence.ts @@ -54,7 +54,6 @@ export type ActionStateStream = Observable< >; /** - * * @whatItDoes Handles pessimistic updates (updating the server first). * * Updating the server, when implemented naively, suffers from race conditions and poor error handling. @@ -109,6 +108,8 @@ export type ActionStateStream = Observable< * ``` * * @param opts + * + * @deprecated This will be removed in Nx v21. Import `pessimisticUpdate` from `@ngrx/router-store/data-persistence` instead. */ export function pessimisticUpdate, A extends Action>( opts: PessimisticUpdateOpts @@ -122,7 +123,6 @@ export function pessimisticUpdate, A extends Action>( } /** - * * @whatItDoes Handles optimistic updates (updating the client first). * * It runs all fetches in order, which removes race conditions and forces the developer to handle errors. @@ -178,6 +178,8 @@ export function pessimisticUpdate, A extends Action>( * ``` * * @param opts + * + * @deprecated This will be removed in Nx v21. Import `optimisticUpdate` from `@ngrx/router-store/data-persistence` instead. */ export function optimisticUpdate, A extends Action>( opts: OptimisticUpdateOpts @@ -191,7 +193,6 @@ export function optimisticUpdate, A extends Action>( } /** - * * @whatItDoes Handles data fetching. * * Data fetching implemented naively suffers from race conditions and poor error handling. @@ -267,6 +268,8 @@ export function optimisticUpdate, A extends Action>( * In addition, if there are multiple requests for Todo 1 scheduled, it will only run the last one. * * @param opts + * + * @deprecated This will be removed in Nx v21. Import `fetch` from `@ngrx/router-store/data-persistence` instead. */ export function fetch, A extends Action>( opts: FetchOpts @@ -342,6 +345,8 @@ export function fetch, A extends Action>( * * @param component * @param opts + * + * @deprecated This will be removed in Nx v21. Import `navigation` from `@ngrx/router-store/data-persistence` instead. */ export function navigation, A extends Action>( component: Type, diff --git a/packages/angular/testing/src/testing-utils.ts b/packages/angular/testing/src/testing-utils.ts index 303fc0a0fc..8c382c8f55 100644 --- a/packages/angular/testing/src/testing-utils.ts +++ b/packages/angular/testing/src/testing-utils.ts @@ -2,7 +2,8 @@ import type { Observable } from 'rxjs'; import { first, toArray } from 'rxjs/operators'; /** - * @deprecated This will be removed in a later version of Nx. Since RxJS 7, use firstValueFrom(obs$.pipe(toArray())) or lastValueFrom(obs$.pipe(toArray())). + * @deprecated This will be removed in Nx v21. If using RxJS 7, use `firstValueFrom(obs$.pipe(toArray()))` + * or `lastValueFrom(obs$.pipe(toArray()))`. If using RxJS 6, use `obs$.pipe(toArray()).toPromise()`. * * @whatItDoes reads all the values from an observable and returns a promise * with an array of all values. This should be used in combination with async/await. @@ -20,7 +21,8 @@ export function readAll(o: Observable): Promise { } /** - * @deprecated This will be removed in a later version of Nx. Since RxJS 7, use firstValueFrom(obs$) + * @deprecated This will be removed in Nx v21. Since RxJS 7, use `firstValueFrom(obs$)`. If using RxJS 6, + * use `obs$.pipe(first()).toPromise()`. * * @whatItDoes reads the first value from an observable and returns a promise * with it. This should be used in combination with async/await.