MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/chartapi.imenso.co/node_modules/import-from/index.d.ts
declare const importFrom: {
	/**
	Import a module like with [`require()`](https://nodejs.org/api/modules.html#modules_require_id) but from a given path.

	@param fromDirectory - Directory to import from.
	@param moduleId - What you would use in `require()`.
	@throws Like `require()`, throws when the module can't be found.

	@example
	```
	import importFrom = require('import-from');

	try {
		const bar = importFrom('foo', './bar');
		// Do something with `bar`
	} catch (error) {
		// `error` is thrown when `./bar` can't be found
	}
	```
	*/
	(fromDirectory: string, moduleId: string): unknown;

	/**
	Import a module like with [`require()`](https://nodejs.org/api/modules.html#modules_require_id) but from a given path.

	@param fromDirectory - Directory to import from.
	@param moduleId - What you would use in `require()`.
	@returns `undefined` instead of throwing when the module can't be found.

	@example
	```
	import importFrom = require('import-from');

	const bar = importFrom.silent('foo', './bar');
	// Do something with `bar`, may be `undefined` when `./bar` can't be found
	```
	*/
	silent(fromDirectory: string, moduleId: string): unknown;
};

export = importFrom;