function isResolverValid(resolver) {
  if ('interfaceVersion' in resolver && resolver.interfaceVersion === 2) {
    return 'resolve' in resolver && !!resolver.resolve && typeof resolver.resolve === 'function';
  }
  return 'resolveImport' in resolver && !!resolver.resolveImport && typeof resolver.resolveImport === 'function';
}
@type {(resolver: object) => resolver is import('./resolve').Resolver}