Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function codegen(
ngOptions: AngularCompilerOptions, cliOptions: NgcCliOptions, program: ts.Program,
host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
private codegen(ngOptions: tsc.AngularCompilerOptions, cliOptions: tsc.NgcCliOptions, program: ts.Program, host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
export const templateCompiler = async (options: CompileOptions, program: Program, compilerHost: TsCompilerHost): Promise => {
const hostContext = new NodeCompilerHostContext();
const ngCompiler = new TranslatingCompilerHost(program, options.angular, hostContext);
const cli = new NgcCliOptions({
i18nFormat: null,
i18nFile: null,
locale: null,
basePath: options.angular.basePath
});
const generator = CodeGenerator.create(options.angular, cli, program, compilerHost, hostContext, ngCompiler);
await generator.codegen();
const metadataWriter = new MetadataWriterHost(compilerHost, options.angular);
metadataWriter.writeFile = compilerHost.writeFile;
return metadataWriter;
};
function codegen(
ngOptions: AngularCompilerOptions, cliOptions: NgcCliOptions, program: ts.Program,
host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
function codegen(ngOptions/*: tsc.AngularCompilerOptions*/, cliOptions/*: tsc.NgcCliOptions*/, program/*: ts.Program*/,
host/*: ts.CompilerHost*/) {
return CodeGenerator
.create(ngOptions, cliOptions, program, host)
.codegen({transitiveModules: true});
}
function codegen(
ngOptions: AngularCompilerOptions, cliOptions: NgcCliOptions, program: ts.Program,
host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
function codegen(
ngOptions: AngularCompilerOptions, cliOptions: NgcCliOptions, program: ts.Program,
host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
return (ngOptions, cliOptions, program, host) => {
const hostContext: CompilerHostContext = new WebpackChainModuleResolutionHostAdapter(host, webpackWrapper);
return CodeGenerator.create(ngOptions, cliOptions, program, host, hostContext).codegen();
}
}
function codegen(ngOptions: AngularCompilerOptions, cliOptions: NgcCliOptions, program: ts.Program, host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}
private codegen(ngOptions: tsc.AngularCompilerOptions, cliOptions: tsc.NgcCliOptions, program: ts.Program, host: ts.CompilerHost) {
return CodeGenerator.create(ngOptions, cliOptions, program, host).codegen();
}