code: function readFiles(filePath, fileType, callback) {
      if (path_1.extname(filePath) === fileType) {
          callback(filePath);
      }
      else if (fs_1.lstatSync(filePath).isDirectory()) {
          // src is directory
          var filesOrDirectories = fs_1.readdirSync(filePath);
          filesOrDirectories.map(function (fileName) {
              var fileOrDirectory = path_1.join(filePath, fileName);
              readFiles(fileOrDirectory, fileType, callback);
          });
      }
  }
docs: Loop over all files from directory and sub-directories