@augment-vir/node
Version:
A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.
15 lines (14 loc) • 639 B
TypeScript
/**
* Determines the path that will be imported into the given `startingPoint` from the given
* `importPath`. Resolves symlinks, tries to map `.js` extensions to `.ts` extensions when needed,
* and tries to find the best `node_modules` import for package imports.
*
* @category Path : Node
* @category Package : @augment-vir/node
* @returns `undefined` if no matches are found.
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
*/
export declare function resolveImportPath({ importerFilePath, importPath, }: Readonly<{
importerFilePath: string;
importPath: string;
}>): string | undefined;