UNPKG

1.06 kBTypeScriptView Raw
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 */
7import type { Config } from '@jest/types';
8import type { FileData } from './types';
9export default class HasteFS {
10 private readonly _rootDir;
11 private readonly _files;
12 constructor({ rootDir, files }: {
13 rootDir: Config.Path;
14 files: FileData;
15 });
16 getModuleName(file: Config.Path): string | null;
17 getSize(file: Config.Path): number | null;
18 getDependencies(file: Config.Path): Array<string> | null;
19 getSha1(file: Config.Path): string | null;
20 exists(file: Config.Path): boolean;
21 getAllFiles(): Array<Config.Path>;
22 getFileIterator(): Iterable<Config.Path>;
23 getAbsoluteFileIterator(): Iterable<Config.Path>;
24 matchFiles(pattern: RegExp | string): Array<Config.Path>;
25 matchFilesWithGlob(globs: Array<Config.Glob>, root: Config.Path | null): Set<Config.Path>;
26 private _getFileData;
27}