text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.CompilerHost = void 0;
  
  var _path = _interopRequireDefault(require("path"));
  
  var _FSHost = require("./FSHost");
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  class CompilerHost extends _FSHost.FSHost {
    constructor(...args) {
      super(...args);
  
      _defineProperty(this, "outputCode", void 0);
  
      _defineProperty(this, "outputMap", void 0);
    }
  
    getSourceFile(filePath, languageVersion) {
      const sourceText = this.readFile(filePath);
      return sourceText !== undefined ? this.ts.createSourceFile(filePath, sourceText, languageVersion) : undefined;
    }
  
    getDefaultLibFileName(options) {
      return this.ts.getDefaultLibFilePath(options);
    }
  
    writeFile(filePath, content) {
      if (_path.default.extname(filePath) === '.map') {
        this.outputMap = content;
      } else {
        this.outputCode = content;
      }
    }
  
    getCanonicalFileName(fileName) {
      return this.ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
    }
  
    useCaseSensitiveFileNames() {
      return this.ts.sys.useCaseSensitiveFileNames;
    }
  
    getNewLine() {
      return this.ts.sys.newLine;
    }
  
  }
  
  exports.CompilerHost = CompilerHost;