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 23
23
[
24
24
" packages/angular/cli/src/analytics/analytics.ts" ,
25
25
" 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"
31
26
]
32
27
]
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.dev/license
7
7
*/
8
8
9
+ import type { AngularServerApp } from './app' ;
9
10
import { Hooks } from './hooks' ;
10
11
import { getPotentialLocaleIdFromUrl } from './i18n' ;
11
12
import { EntryPointExports , getAngularAppEngineManifest } from './manifest' ;
@@ -89,7 +90,10 @@ export class AngularAppEngine implements AngularServerAppManager {
89
90
}
90
91
91
92
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 ;
93
97
serverApp . hooks = this . hooks ;
94
98
95
99
return serverApp . render ( request , requestContext ) ;
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.dev/license
7
7
*/
8
8
9
- import type { destroyAngularServerApp , getOrCreateAngularServerApp } from './app' ;
10
9
import type { SerializableRouteTreeNode } from './routes/route-tree' ;
11
10
import { AngularBootstrap } from './utils/ng' ;
12
11
@@ -16,13 +15,15 @@ import { AngularBootstrap } from './utils/ng';
16
15
export interface EntryPointExports {
17
16
/**
18
17
* 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.
19
20
*/
20
- ɵgetOrCreateAngularServerApp : typeof getOrCreateAngularServerApp ;
21
+ ɵgetOrCreateAngularServerApp : ( ) => unknown ;
21
22
22
23
/**
23
24
* A reference to the function that destroys the `AngularServerApp` instance.
24
25
*/
25
- ɵdestroyAngularServerApp : typeof destroyAngularServerApp ;
26
+ ɵdestroyAngularServerApp : ( ) => void ;
26
27
}
27
28
28
29
/**
You can’t perform that action at this time.
0 commit comments