/** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */importtype{Config}from'@jest/types';importtype{FSasHasteFS}from'jest-haste-map';importResolver=require('jest-resolve');import{SnapshotResolver}from'jest-snapshot';declarenamespaceDependencyResolver{typeResolvedModule={file:Config.Path;dependencies:Array<Config.Path>;};}/** * DependencyResolver is used to resolve the direct dependencies of a module or * to retrieve a list of all transitive inverse dependencies. */declareclassDependencyResolver{private_hasteFS;private_resolver;private_snapshotResolver;constructor(resolver:Resolver,hasteFS:HasteFS,snapshotResolver:SnapshotResolver);resolve(file:Config.Path,options?:Resolver.ResolveModuleConfig):Array<Config.Path>;resolveInverseModuleMap(paths:Set<Config.Path>,filter:(file:Config.Path)=>boolean,options?:Resolver.ResolveModuleConfig):Array<DependencyResolver.ResolvedModule>;resolveInverse(paths:Set<Config.Path>,filter:(file:Config.Path)=>boolean,options?:Resolver.ResolveModuleConfig):Array<Config.Path>;}export=DependencyResolver;