diff --git a/packages/angular/ssr/src/app-engine.ts b/packages/angular/ssr/src/app-engine.ts index 9862901c7c4f..31b2e804f23c 100644 --- a/packages/angular/ssr/src/app-engine.ts +++ b/packages/angular/ssr/src/app-engine.ts @@ -50,7 +50,7 @@ export class AngularAppEngine { /** * A cache that holds entry points, keyed by their potential locale string. */ - private readonly entryPointsCache = new Map(); + private readonly entryPointsCache = new Map>(); /** * Renders a response for the given HTTP request using the server application. @@ -110,9 +110,7 @@ export class AngularAppEngine { * @param potentialLocale - The locale string used to find the corresponding entry point. * @returns A promise that resolves to the entry point exports or `undefined` if not found. */ - private async getEntryPointExports( - potentialLocale: string, - ): Promise { + private getEntryPointExports(potentialLocale: string): Promise | undefined { const cachedEntryPoint = this.entryPointsCache.get(potentialLocale); if (cachedEntryPoint) { return cachedEntryPoint; @@ -124,7 +122,7 @@ export class AngularAppEngine { return undefined; } - const entryPointExports = await entryPoint(); + const entryPointExports = entryPoint(); this.entryPointsCache.set(potentialLocale, entryPointExports); return entryPointExports; @@ -141,7 +139,7 @@ export class AngularAppEngine { * @param url - The URL of the request. * @returns A promise that resolves to the entry point exports or `undefined` if not found. */ - private getEntryPointExportsForUrl(url: URL): Promise { + private getEntryPointExportsForUrl(url: URL): Promise | undefined { const { entryPoints, basePath } = this.manifest; if (entryPoints.size === 1) { return this.getEntryPointExports('');