File: index.d.ts

package info (click to toggle)
node-yarn-tool-resolve-package 2.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 96 kB
  • sloc: javascript: 53; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 1,057 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import type { IPackageJson } from '@ts-type/package-dts';
/**
 * @see RequireResolve
 */
export interface IOptions {
    paths?: string[];
}
export declare function resolvePackageCore(moduleName: string, options?: IOptions): {
    name: string;
    pkgRoot: string;
    entryPointLocation: string;
};
export declare function resolvePackageRoot(moduleName: string, options?: IOptions): string;
export declare function resolvePackageJsonLocation(moduleName: string, options?: IOptions): string;
export declare function createResolveLocationFn(moduleName: string, options?: IOptions): (path: string, ...paths: string[]) => string;
export declare function readModulePackageJson<P extends IPackageJson>(moduleName: string, options?: IOptions): P;
export declare function resolvePackage<P extends IPackageJson>(moduleName: string, options?: IOptions): {
    pkg: P;
    pkgJsonLocation: string;
    resolveLocation(path: string, ...paths: string[]): string;
    name: string;
    pkgRoot: string;
    entryPointLocation: string;
};
export default resolvePackage;