typescript
Version:
TypeScript is a language for application scale JavaScript development
24 lines • 2.08 kB
JavaScript
// Code generated by tools/scripts/tsc/generate-options.ts. DO NOT EDIT.
import { toRootedDirectoryPath, toRootedFilePath, toRootedPath, } from "./path.js";
export function prepareCompilerOptions(options, currentDirectory) {
const { declarationDir, outDir, project, rootDir, rootDirs, tsBuildInfoFile, typeRoots, baseUrl, outFile, configFilePath, pathsBasePath, generateCpuProfile, generateTrace, pprofDir, ...rest } = options;
const result = {
...rest,
declarationDir: declarationDir === undefined ? undefined : toRootedDirectoryPath(declarationDir, currentDirectory),
outDir: outDir === undefined ? undefined : toRootedDirectoryPath(outDir, currentDirectory),
project: project === undefined ? undefined : toRootedPath(project, currentDirectory),
rootDir: rootDir === undefined ? undefined : toRootedDirectoryPath(rootDir, currentDirectory),
rootDirs: rootDirs?.map(value => toRootedDirectoryPath(value, currentDirectory)),
tsBuildInfoFile: tsBuildInfoFile === undefined ? undefined : toRootedFilePath(tsBuildInfoFile, currentDirectory),
typeRoots: typeRoots?.map(value => toRootedDirectoryPath(value, currentDirectory)),
baseUrl: baseUrl === undefined ? undefined : toRootedDirectoryPath(baseUrl, currentDirectory),
outFile: outFile === undefined ? undefined : toRootedFilePath(outFile, currentDirectory),
configFilePath: configFilePath === undefined ? undefined : toRootedFilePath(configFilePath, currentDirectory),
pathsBasePath: pathsBasePath === undefined ? undefined : toRootedDirectoryPath(pathsBasePath, currentDirectory),
generateCpuProfile: generateCpuProfile === undefined ? undefined : toRootedFilePath(generateCpuProfile, currentDirectory),
generateTrace: generateTrace === undefined ? undefined : toRootedDirectoryPath(generateTrace, currentDirectory),
pprofDir: pprofDir === undefined ? undefined : toRootedDirectoryPath(pprofDir, currentDirectory),
};
return result;
}
//# sourceMappingURL=prepareCompilerOptions.generated.js.map