import type { EnvironmentProviders, Provider } from '@angular/core'; import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers'; type AngularPageRenderOptions = StreamingSlotEnhancerOptions & { collectStreamingSlots?: boolean; }; /** True when the request-context type has no required keys — used to * flip the `requestContext` argument between required and optional. * Pages whose `Context` has only optional fields (or where the caller * passes no generic at all) can omit `requestContext`. */ type HasNoRequiredContextKeys = keyof Ctx extends never ? true : Partial extends Ctx ? true : false; export type AngularPageRequestInput = AngularPageRenderOptions & { headTag?: `${string}`; indexPath: string; pagePath: string; /** The incoming request. When provided, its URL is forwarded to * Angular's `renderApplication`, so `LocationStrategy.path()` and * Angular Router both see the real URL instead of `/`. Without it, * Router-based pages can't match anything but the root route. */ request?: Request; /** Mutable response init made available through Angular's RESPONSE_INIT token. */ responseInit?: ResponseInit; /** Extra per-request providers merged in on top of the page * module's bundled providers (`appProviders` + `provideRouter` + * `APP_BASE_HREF`) at SSR bootstrap. Use for handler-scoped DI * values that depend on the request — e.g. a tenant-specific * feature-flag service, a per-request HTTP interceptor token, * or test-only overrides. The same Angular module instance is * shared (the backend resolves `@angular/core` through the same * `node_modules` Bun cache key as the rebuilt page bundle), so * tokens declared here interop with the bundled providers. * * **SSR-only.** The browser bundle doesn't see these — the * client picks up only the providers baked into the page * module. If the same provider must run on both sides, add it * to `absolute.config.ts > angular.providers` instead. */ providers?: ReadonlyArray; /** Sitemap metadata for this route. Statically read from the handler * source at registration time, so only literal-object values are * honoured. For finer control use `Route.data.sitemap` in the * page's `Routes` config, or `sitemap.overrides` in `absolute.config.ts`. */ sitemap?: import('../../types/sitemap').PageHandlerSitemapMetadata; } & (HasNoRequiredContextKeys extends true ? { requestContext?: NoInfer; } : { requestContext: NoInfer; }); export declare const handleAngularPageRequest: (input: AngularPageRequestInput) => Promise; export {};