import { PackageJson } from 'type-fest'; /** Copied from */ export type ResolverOptions = { /** Directory to begin resolving from. */ basedir: string; /** List of export conditions. */ conditions?: Array; /** Instance of default resolver. */ defaultResolver: (path: string, options: ResolverOptions) => string; /** List of file extensions to search in order. */ extensions?: Array; /** List of directory names to be looked up for modules recursively. */ moduleDirectory?: Array; /** List of `require.paths` to use if nothing is found in `node_modules`. */ paths?: Array; /** Allows transforming parsed `package.json` contents. */ packageFilter?: (pkg: PackageJson, file: string, dir: string) => PackageJson; /** Allows transforms a path within a package. */ pathFilter?: (pkg: PackageJson, path: string, relativePath: string) => string; /** Current root directory. */ rootDir?: string; };