function getImportedVariableNames(
  baseClasses,
  decorators,
  functions,
  importDeclaration,
  filename,
  rootDir,
) {
  const importSpecifier = importDeclaration.node.source.value;
  const matches = getMatchesForImport(
    baseClasses,
    decorators,
    functions,
    importSpecifier,
    filename,
    rootDir,
  );
  /** @type {string[]} */
  const baseClassNames = [];
  /** @type {string[]} */
  const decoratorNames = [];
  /** @type {string[]} */
  const functionNames = [];

  if (matches.baseClasses.length || matches.decorators.length || matches.functions.length) {
    for (const specifier of importDeclaration.get('specifiers')) {
      if (specifier.isImportDefaultSpecifier()) {
        if (matches.baseClasses.some(cl => cl.name === 'default')) {
          baseClassNames.push(specifier.node.local.name);
        }
        if (matches.decorators.some(cl => cl.name === 'default')) {
          decoratorNames.push(specifier.node.local.name);
        }
        if (matches.functions.some(cl => cl.name === 'default')) {
          functionNames.push(specifier.node.local.name);
        }
      } else if (specifier.isImportSpecifier()) {
        const imported = specifier.get('imported');
        if (singlePath(imported)) {
          const importedName = imported.isIdentifier()
            ? imported.node.name
            : /** @type {StringLiteral} */ (imported.node).value;
          if (matches.baseClasses.some(cl => cl.name === importedName)) {
            baseClassNames.push(specifier.node.local.name);
          }
          if (matches.decorators.some(cl => cl.name === importedName)) {
            decoratorNames.push(specifier.node.local.name);
          }
          if (matches.functions.some(cl => cl.name === importedName)) {
            functionNames.push(specifier.node.local.name);
          }
        }
      }
    }
  }
  return { baseClassNames, decoratorNames, functionNames };
}
@param {BaseClass[]} baseClasses
@param {Decorator[]} decorators
@param {FunctionOption[]} functions
@param {NodePath<ImportDeclaration>} importDeclaration
@param {string} filename
@param {string} rootDir