defaultResolver.d.ts 944 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 type { Config } from '@jest/types';
  8. import { PkgJson } from './fileWalkers';
  9. interface ResolverOptions {
  10. basedir: Config.Path;
  11. browser?: boolean;
  12. conditions?: Array<string>;
  13. defaultResolver: typeof defaultResolver;
  14. extensions?: Array<string>;
  15. moduleDirectory?: Array<string>;
  16. paths?: Array<Config.Path>;
  17. rootDir?: Config.Path;
  18. packageFilter?: (pkg: PkgJson, dir: string) => PkgJson;
  19. pathFilter?: (pkg: PkgJson, path: string, relativePath: string) => string;
  20. }
  21. declare global {
  22. namespace NodeJS {
  23. interface ProcessVersions {
  24. pnp?: any;
  25. }
  26. }
  27. }
  28. export default function defaultResolver(path: Config.Path, options: ResolverOptions): Config.Path;
  29. export {};