-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
55 lines (51 loc) · 1.95 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { ApplicationRef } from '@angular/core';
import { StaticProvider } from '@angular/core';
import { Type } from '@angular/core';
/**
* A common engine to use to server render an application.
*/
export declare class CommonEngine {
private options?;
private readonly templateCache;
private readonly inlineCriticalCssProcessor;
private readonly pageIsSSG;
constructor(options?: CommonEngineOptions | undefined);
/**
* Render an HTML document for a specific URL with specified
* render options
*/
render(opts: CommonEngineRenderOptions): Promise<string>;
private inlineCriticalCss;
private retrieveSSGPage;
private renderApplication;
/** Retrieve the document from the cache or the filesystem */
private getDocument;
}
export declare interface CommonEngineOptions {
/** A method that when invoked returns a promise that returns an `ApplicationRef` instance once resolved or an NgModule. */
bootstrap?: Type<{}> | (() => Promise<ApplicationRef>);
/** A set of platform level providers for all requests. */
providers?: StaticProvider[];
/** Enable request performance profiling data collection and printing the results in the server console. */
enablePerformanceProfiler?: boolean;
}
export declare interface CommonEngineRenderOptions {
/** A method that when invoked returns a promise that returns an `ApplicationRef` instance once resolved or an NgModule. */
bootstrap?: Type<{}> | (() => Promise<ApplicationRef>);
/** A set of platform level providers for the current request. */
providers?: StaticProvider[];
url?: string;
document?: string;
documentFilePath?: string;
/**
* Reduce render blocking requests by inlining critical CSS.
* Defaults to true.
*/
inlineCriticalCss?: boolean;
/**
* Base path location of index file.
* Defaults to the 'documentFilePath' dirname when not provided.
*/
publicPath?: string;
}
export { }