mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
export type RequireResolveOptions = {
|
|
/**
|
|
* Additional paths to resolve from.
|
|
*/
|
|
paths?: string[];
|
|
};
|
|
export type RequireResolve = (id: string, options: RequireResolveOptions) => string;
|
|
/**
|
|
* Resolves modules according to Node's resolution rules.
|
|
*
|
|
* @param {string} id Module name or path.
|
|
* @param {string[]} [paths] Additional paths to resolve from.
|
|
* @returns {string} Resolved module path.
|
|
*/
|
|
export function resolveModule(id: string, paths?: string[]): string;
|
|
/**
|
|
* @typedef RequireResolveOptions
|
|
* @property {string[]} [paths] Additional paths to resolve from.
|
|
*/
|
|
/**
|
|
* @callback RequireResolve
|
|
* @param {string} id Module name or path.
|
|
* @param {RequireResolveOptions} options Options to apply.
|
|
* @returns {string} Resolved module path.
|
|
*/
|
|
/**
|
|
* Resolves modules according to Node's resolution rules.
|
|
*
|
|
* @param {RequireResolve} resolve Node-like require.resolve implementation.
|
|
* @param {string} id Module name or path.
|
|
* @param {string[]} [paths] Additional paths to resolve from.
|
|
* @returns {string} Resolved module path.
|
|
*/
|
|
export function resolveModuleCustomResolve(resolve: RequireResolve, id: string, paths?: string[]): string;
|