ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
17 lines (16 loc) • 840 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var fileSystem_1 = require("./../../fileSystem");
var getInfoFromTsConfig_1 = require("./getInfoFromTsConfig");
/**
* Gets the compiler options from a specified tsconfig.json
* @param filePath - File path to the tsconfig.json.
* @param fileSystemHost - Optional file system host.
*/
function getCompilerOptionsFromTsConfig(filePath, fileSystemHost) {
// remember, this is a public function
fileSystemHost = fileSystemHost || new fileSystem_1.DefaultFileSystemHost();
var parseResult = getInfoFromTsConfig_1.getTsConfigParseResult(filePath, fileSystemHost);
return getInfoFromTsConfig_1.getCompilerOptionsFromTsConfigParseResult(filePath, fileSystemHost, parseResult);
}
exports.getCompilerOptionsFromTsConfig = getCompilerOptionsFromTsConfig;