Skip to content

Commit 664b290

Browse files
committed
refactor(common): mark private methods with private keyword
1 parent 39f5909 commit 664b290

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

modules/common/engine/src/engine.ts

+15-16
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,10 @@ export interface RenderOptions {
4040
*/
4141
export class CommonEngine {
4242

43-
/** Return an instance of the platformServer compiler */
44-
getCompiler(): Compiler {
45-
const compilerFactory: CompilerFactory = platformDynamicServer().injector.get(CompilerFactory);
46-
47-
return compilerFactory.createCompiler([
48-
{ providers: [{ provide: ResourceLoader, useClass: FileLoader, deps: [] }] }
49-
]);
50-
}
51-
52-
private factoryCacheMap = new Map<Type<{}>, NgModuleFactory<{}>>();
53-
private templateCache = new Map<string, string>();
54-
private inlineCriticalCssProcessor: InlineCriticalCssProcessor;
55-
private pageExists = new Map<string, boolean>();
56-
43+
private readonly factoryCacheMap = new Map<Type<{}>, NgModuleFactory<{}>>();
44+
private readonly templateCache = new Map<string, string>();
45+
private readonly inlineCriticalCssProcessor: InlineCriticalCssProcessor;
46+
private readonly pageExists = new Map<string, boolean>();
5747

5848
constructor(private moduleOrFactory?: Type<{}> | NgModuleFactory<{}>,
5949
private providers: StaticProvider[] = []) {
@@ -133,7 +123,7 @@ export class CommonEngine {
133123
}
134124

135125
/** Return the factory for a given engine instance */
136-
async getFactory(moduleOrFactory: Type<{}> | NgModuleFactory<{}>): Promise<NgModuleFactory<{}>> {
126+
private async getFactory(moduleOrFactory: Type<{}> | NgModuleFactory<{}>): Promise<NgModuleFactory<{}>> {
137127
// If module has been compiled AoT
138128
if (moduleOrFactory instanceof NgModuleFactory) {
139129
return moduleOrFactory;
@@ -155,7 +145,7 @@ export class CommonEngine {
155145
}
156146

157147
/** Retrieve the document from the cache or the filesystem */
158-
async getDocument(filePath: string): Promise<string> {
148+
private async getDocument(filePath: string): Promise<string> {
159149
let doc = this.templateCache.get(filePath);
160150

161151
if (!doc) {
@@ -165,4 +155,13 @@ export class CommonEngine {
165155

166156
return doc;
167157
}
158+
159+
/** Return an instance of the platformServer compiler */
160+
private getCompiler(): Compiler {
161+
const compilerFactory: CompilerFactory = platformDynamicServer().injector.get(CompilerFactory);
162+
163+
return compilerFactory.createCompiler([
164+
{ providers: [{ provide: ResourceLoader, useClass: FileLoader, deps: [] }] }
165+
]);
166+
}
168167
}

0 commit comments

Comments
 (0)