Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Look for foo.d.ts or foo.ts on disk
fileName = file + (ext || '');
}
}
return tsHost.fileExists(fileName);
};
function generatedFileModuleResolver(
moduleName: string, containingFile: string,
compilerOptions: ts.CompilerOptions): ts.ResolvedModuleWithFailedLookupLocations {
return ts.resolveModuleName(
moduleName, containingFile, compilerOptions, generatedFileModuleResolverHost);
}
if (!bazelHost) {
bazelHost = new CompilerHost(
files, compilerOpts, bazelOpts, tsHost, fileLoader, generatedFileModuleResolver);
}
// Also need to disable decorator downleveling in the BazelHost in Ivy mode.
if (isInIvyMode) {
bazelHost.transformDecorators = false;
}
// Prevent tsickle adding any types at all if we don't want closure compiler annotations.
if (compilerOpts.annotateForClosureCompiler) {
bazelHost.transformTypesToClosure = true;
bazelHost.transformDecorators = true;
}
const origBazelHostFileExist = bazelHost.fileExists;
bazelHost.fileExists = (fileName: string) => {
if (NGC_ASSETS.test(fileName)) {
);
}
const options = config['svelteCompilerOptions'] as SvelteCompilerOptions;
options.expectedOuts = options.expectedOuts.map(p => p.replace(/\\/g, '/'));
// TODO
options.suppressWarnings = options.suppressWarnings || [];
options.dev = bazelOpts.es5Mode;
options.immutable = bazelOpts.es5Mode;
this.options = options;
this.tsHost = ts.createCompilerHost(this.compilerOpts, true);
this.fileLoader = createFileLoader(this.fileCache, inputs);
this.bazelHost = new CompilerHost(
this.files,
this.compilerOpts,
this.bazelOpts,
this.tsHost,
this.fileLoader,
);
this.bazelHost.transformTypesToClosure = Boolean(
this.compilerOpts.annotateForClosureCompiler,
);
}