function isTypeOnlyImport(variable) {
  if (variable.defs.length === 0) return false

  return variable.defs.every((def) => {
    if (def.type !== 'ImportBinding') {
      return false
    }
    if (def.parent.importKind === 'type') {
      // check for `import type Foo from './xxx'`
      return true
    }
    if (def.node.type === 'ImportSpecifier' && def.node.importKind === 'type') {
      // check for `import { type Foo } from './xxx'`
      return true
    }
    return false
  })
}
Checks whether the given variable is the type-only import object.
@param {Variable} variable
@returns {boolean} `true` if the given variable is the type-only import.