code: function getBasename(relativePath) {
      const mayBeSuffix = [".ts", ".tsx", ".d.ts"];
      let mayBePath = relativePath;
      mayBeSuffix.map(suffix => {
          const tmpPath = path_1.default.basename(relativePath, suffix);
          if (tmpPath.length < mayBePath.length) {
              mayBePath = tmpPath;
          }
      });
      // Return whichever path is shorter. If they're the same length then nothing was stripped.
      return mayBePath;
  }
docs: Strips the .ts or .tsx file extension from a path and returns the base filename.