MCPcopy Index your code
hub / github.com/ptmt/react-native-macos / constructor

Method constructor

packager/src/node-haste/index.js:85–102  ·  view source on GitHub ↗
(config: {|
    +opts: Options,
    +haste: JestHasteMap,
    +initialHasteFS: HasteFS,
    +initialModuleMap: ModuleMap,
  |})

Source from the content-addressed store, hash-verified

83 _moduleMap: ModuleMap;
84
85 constructor(config: {|
86 +opts: Options,
87 +haste: JestHasteMap,
88 +initialHasteFS: HasteFS,
89 +initialModuleMap: ModuleMap,
90 |}) {
91 super();
92 invariant(config.opts.maxWorkerCount >= 1, 'worker count must be greater or equal to 1');
93 this._opts = config.opts;
94 this._filesByDirNameIndex = new FilesByDirNameIndex(config.initialHasteFS.getAllFiles());
95 this._haste = config.haste;
96 this._hasteFS = config.initialHasteFS;
97 this._moduleMap = config.initialModuleMap;
98 this._helpers = new DependencyGraphHelpers(this._opts);
99 this._haste.on('change', this._onHasteChange.bind(this));
100 this._moduleCache = this._createModuleCache();
101 (this: any)._matchFilesByDirAndPattern = this._matchFilesByDirAndPattern.bind(this);
102 }
103
104 static _createHaste(opts: Options): JestHasteMap {
105 return new JestHasteMap({

Callers

nothing calls this directly

Calls 3

_createModuleCacheMethod · 0.95
invariantFunction · 0.85
getAllFilesMethod · 0.45

Tested by

no test coverage detected