feat: use go tool
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user