UNPKG

1.27 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/**
9 * A request to render a Server bundle generate by the universal server builder.
10 */
11interface RenderRequest {
12 /**
13 * The path to the server bundle that should be loaded and rendered.
14 */
15 serverBundlePath: string;
16 /**
17 * The existing HTML document as a string that will be augmented with the rendered application.
18 */
19 document: string;
20 /**
21 * An optional URL path that represents the Angular route that should be rendered.
22 */
23 url: string | undefined;
24}
25/**
26 * Renders an application based on a provided server bundle path, initial document, and optional URL route.
27 * @param param0 A request to render a server bundle.
28 * @returns A promise that resolves to the render HTML document for the application.
29 */
30declare function render({ serverBundlePath, document, url }: RenderRequest): Promise<string>;
31/**
32 * The default export will be the promise returned by the initialize function.
33 * This is awaited by piscina prior to using the Worker.
34 */
35declare const _default: Promise<typeof render>;
36export default _default;