defaultResolver.d.ts 922 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. import { Opts as ResolveOpts } from 'resolve';
  8. import type { Config } from '@jest/types';
  9. declare type ResolverOptions = {
  10. allowPnp?: boolean;
  11. basedir: Config.Path;
  12. browser?: boolean;
  13. defaultResolver: typeof defaultResolver;
  14. extensions?: Array<string>;
  15. moduleDirectory?: Array<string>;
  16. paths?: Array<Config.Path>;
  17. rootDir?: Config.Path;
  18. packageFilter?: ResolveOpts['packageFilter'];
  19. };
  20. declare global {
  21. namespace NodeJS {
  22. interface ProcessVersions {
  23. pnp?: unknown;
  24. }
  25. }
  26. }
  27. export default function defaultResolver(path: Config.Path, options: ResolverOptions): Config.Path;
  28. export declare function clearDefaultResolverCache(): void;
  29. export {};