MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/snap.cafsinfotech.in/node_modules/resolve-pkg/index.d.ts
declare namespace resolvePkg {
	interface Options {
		/**
		Directory to resolve from.

		@default process.cwd()
		*/
		readonly cwd?: string;
	}
}

/**
Resolve the path of a package regardless of it having an entry point.

@param moduleId - What you would use in `require()`.

@example
```
import resolvePkg = require('resolve-pkg');

// $ npm install --save-dev grunt-svgmin

resolvePkg('grunt-svgmin/tasks', {cwd: __dirname});
//=> '/Users/sindresorhus/unicorn/node_modules/grunt-svgmin/tasks'

// Fails here as Grunt tasks usually don't have a defined main entry point
require.resolve('grunt-svgmin/tasks');
//=> Error: Cannot find module 'grunt-svgmin'
```
*/
declare function resolvePkg(
	moduleId: string,
	options?: resolvePkg.Options
): string | undefined;

export = resolvePkg;