lix-website/themes/lix/assets/bootstrap/node_modules/resolve-global/index.d.ts
2024-04-26 22:49:34 -06:00

29 lines
727 B
TypeScript

declare const resolveGlobal: {
/**
Resolve the path of a globally installed module.
@param moduleId - What you would use in `require()`.
@returns The resolved path. Throws if the module can't be found.
@example
```
// $ npm install --global cat-names
import resolveGlobal = require('resolve-global');
console.log(resolveGlobal('cat-names'));
//=> '/usr/local/lib/node_modules/cat-names'
```
*/
(moduleId: string): string;
/**
Resolve the path of a globally installed module.
@param moduleId - What you would use in `require()`.
@returns The resolved path. Returns `undefined` instead of throwing if the module can't be found.
*/
silent(moduleId: string): string | undefined;
};
export = resolveGlobal;