code: function buildImportPath(directory, target, baseUrl) {
      // If the base URL option is set then imports should be relative to there.
      const startLocation = baseUrl ? baseUrl : directory.path;
      const relativePath = path_1.default.relative(startLocation, target.path);
      // Get the route and ensure it's relative
      let directoryPath = path_1.default.dirname(relativePath);
      if (directoryPath !== ".") {
          directoryPath = `.${path_1.default.sep}${directoryPath}`;
      }
      // Strip off the .ts or .tsx from the file name.
      const fileName = getBasename(relativePath);
      // Build the final path string. Use posix-style seperators.
      const location = `${directoryPath}${path_1.default.sep}${fileName}`;
      const convertedLocation = utilities_1.convertPathSeparator(location);
      return stripThisDirectory(convertedLocation, baseUrl);
  }
docs: Builds the TypeScript