Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(fileName, eventKind) => {
sideInputsConverted.delete(fileName);
callback(fileName, eventKind);
if (options?._fileWatcher) {
options._fileWatcher(fileName, eventKind);
}
},
pollingInterval
);
};
const host = ts.createWatchCompilerHost(
[declFilename, srcFilename],
{
// module is ESNext, not ES2015, to support dynamic import.
module: ts.ModuleKind.ESNext,
moduleResolution: ts.ModuleResolutionKind.NodeJs,
esModuleInterop: true,
target: traspileTarget,
declaration: true,
newLine: ts.NewLineKind.LineFeed,
// Remove 'use strict' from outputs.
noImplicitUseStrict: true,
typeRoots: getTypeRoots(),
// allowJs, checkJs and outDir are necessary to transpile .js files.
allowJs: true,
checkJs: true,
// tslab does not show error messages in d.ts (e.g. files in @types).
// This may improve the compile performance slightly.
skipLibCheck: true,
// rootDir is necessary to stabilize the paths of output files.
rootDir: cwd,
outDir