mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(common): temporarily re-export and deprecate XhrFactory (#41393)
The moved `XhrFactory` still needs to be available from `@angular/common/http` for some libraries that were built prior to 12.0.0, otherwise they cannot be used in applications built post-12.0.0. This commit adds back the re-export of `XhrFactory` and deprecates it. PR Close #41393
This commit is contained in:
committed by
Alex Rickabaugh
parent
6391a4a49d
commit
7dfa446c4a
@@ -6,6 +6,27 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {XhrFactory as XhrFactory_fromAngularCommon} from '@angular/common';
|
||||
|
||||
/**
|
||||
* A wrapper around the `XMLHttpRequest` constructor.
|
||||
*
|
||||
* @publicApi
|
||||
* @see `XhrFactory`
|
||||
* @deprecated
|
||||
* `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.
|
||||
*/
|
||||
export type XhrFactory = XhrFactory_fromAngularCommon;
|
||||
/**
|
||||
* A wrapper around the `XMLHttpRequest` constructor.
|
||||
*
|
||||
* @publicApi
|
||||
* @see `XhrFactory`
|
||||
* @deprecated
|
||||
* `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.
|
||||
*/
|
||||
export const XhrFactory = XhrFactory_fromAngularCommon;
|
||||
|
||||
export {HttpBackend, HttpHandler} from './src/backend';
|
||||
export {HttpClient} from './src/client';
|
||||
export {HttpContext, HttpContextToken} from './src/context';
|
||||
|
||||
Reference in New Issue
Block a user