docs: function extract(archive, dest, switches, progress) {
      return externals_1.Promise.try(function () {
          if (!archive) {
              throw new Error("Archive path must be defined");
          }
          else if (!dest) {
              throw new Error("Destination path must be defined");
          }
          else if (!exports_1.Helpers.pathIsAbsoluteOrHome(archive)) {
              throw new Error("Archive path must be absolute");
          }
          var params = [exports_1.Helpers.pathResolveHome(externals_1.Path.normalize(archive)), ("-o" + exports_1.Helpers.pathResolveHome(externals_1.Path.normalize(dest)))];
          switches = externals_1._.extend([], switches);
          addOverwriteSwitches(switches);
          addFiles(switches);
          switches.push("-y");
          return SevenZip.run(switches.flatten ? "e" : "x", params, switches, progress);
      });
  }