File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2323 [
2424 " packages/angular/cli/src/analytics/analytics.ts" ,
2525 " packages/angular/cli/src/command-builder/command-module.ts"
26- ],
27- [
28- " packages/angular/ssr/src/app.ts" ,
29- " packages/angular/ssr/src/assets.ts" ,
30- " packages/angular/ssr/src/manifest.ts"
3126 ]
3227]
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.dev/license
77 */
88
9+ import type { AngularServerApp } from './app' ;
910import { Hooks } from './hooks' ;
1011import { getPotentialLocaleIdFromUrl } from './i18n' ;
1112import { EntryPointExports , getAngularAppEngineManifest } from './manifest' ;
@@ -89,7 +90,10 @@ export class AngularAppEngine implements AngularServerAppManager {
8990 }
9091
9192 const { ɵgetOrCreateAngularServerApp : getOrCreateAngularServerApp } = await entryPoint ( ) ;
92- const serverApp = getOrCreateAngularServerApp ( ) ;
93+ // Note: Using `instanceof` is not feasible here because `AngularServerApp` will
94+ // be located in separate bundles, making `instanceof` checks unreliable.
95+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
96+ const serverApp = getOrCreateAngularServerApp ( ) as AngularServerApp ;
9397 serverApp . hooks = this . hooks ;
9498
9599 return serverApp . render ( request , requestContext ) ;
Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.dev/license
77 */
88
9- import type { destroyAngularServerApp , getOrCreateAngularServerApp } from './app' ;
109import type { SerializableRouteTreeNode } from './routes/route-tree' ;
1110import { AngularBootstrap } from './utils/ng' ;
1211
@@ -16,13 +15,15 @@ import { AngularBootstrap } from './utils/ng';
1615export interface EntryPointExports {
1716 /**
1817 * A reference to the function that creates an Angular server application instance.
18+ *
19+ * @note The return type is `unknown` to prevent circular dependency issues.
1920 */
20- ɵgetOrCreateAngularServerApp : typeof getOrCreateAngularServerApp ;
21+ ɵgetOrCreateAngularServerApp : ( ) => unknown ;
2122
2223 /**
2324 * A reference to the function that destroys the `AngularServerApp` instance.
2425 */
25- ɵdestroyAngularServerApp : typeof destroyAngularServerApp ;
26+ ɵdestroyAngularServerApp : ( ) => void ;
2627}
2728
2829/**
You can’t perform that action at this time.
0 commit comments