Skip to content

Commit 65b6e75

Browse files
committed
fix(@angular/ssr): export RESPONSE_INIT, REQUEST, and REQUEST_CONTEXT tokens
This commit exports that the `RESPONSE_INIT`, `REQUEST`, and `REQUEST_CONTEXT` tokens.
1 parent ce26415 commit 65b6e75

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

goldens/public-api/angular/ssr/index.api.md

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
```ts
66

77
import { EnvironmentProviders } from '@angular/core';
8+
import { InjectionToken } from '@angular/core';
89

910
// @public
1011
export class AngularAppEngine {
@@ -34,6 +35,15 @@ export enum RenderMode {
3435
Server = 1
3536
}
3637

38+
// @public
39+
export const REQUEST: InjectionToken<Request>;
40+
41+
// @public
42+
export const REQUEST_CONTEXT: InjectionToken<unknown>;
43+
44+
// @public
45+
export const RESPONSE_INIT: InjectionToken<ResponseInit>;
46+
3747
// @public
3848
export type ServerRoute = ServerRouteAppShell | ServerRouteClient | ServerRoutePrerender | ServerRoutePrerenderWithParams | ServerRouteServer;
3949

packages/angular/ssr/public_api.ts

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ export {
1717
provideServerRoutesConfig,
1818
RenderMode,
1919
} from './src/routes/route-config';
20+
21+
export { REQUEST, RESPONSE_INIT, REQUEST_CONTEXT } from './src/tokens';

packages/angular/ssr/src/tokens.ts

+3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ import { InjectionToken } from '@angular/core';
1010

1111
/**
1212
* Injection token for the current request.
13+
* @developerPreview
1314
*/
1415
export const REQUEST = new InjectionToken<Request>('REQUEST');
1516

1617
/**
1718
* Injection token for the response initialization options.
19+
* @developerPreview
1820
*/
1921
export const RESPONSE_INIT = new InjectionToken<ResponseInit>('RESPONSE_INIT');
2022

2123
/**
2224
* Injection token for additional request context.
25+
* @developerPreview
2326
*/
2427
export const REQUEST_CONTEXT = new InjectionToken<unknown>('REQUEST_CONTEXT');

0 commit comments

Comments
 (0)