Duffer Derek

Current Path : /var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro/src/node-haste/
Upload File :
Current File : /var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro/src/node-haste/Module.js.flow

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict-local
 * @format
 * @oncall react_native
 */

'use strict';

import type ModuleCache from './ModuleCache';
import type Package from './Package';

import path from 'path';

class Module {
  path: string;

  _moduleCache: ModuleCache;
  _sourceCode: ?string;

  constructor(file: string, moduleCache: ModuleCache) {
    if (!path.isAbsolute(file)) {
      throw new Error('Expected file to be absolute path but got ' + file);
    }

    this.path = file;
    this._moduleCache = moduleCache;
  }

  getPackage(): ?Package {
    return this._moduleCache.getPackageForModule(this)?.pkg;
  }

  invalidate() {}
}

module.exports = Module;

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists