UNPKG

1.22 kBTypeScriptView Raw
1import type { ParserPreset, UserConfig } from '@commitlint/types';
2/**
3 * @see moduleResolve
4 */
5export declare const resolveFrom: (lookup: string, parent?: string) => string;
6/**
7 *
8 * @param resolvedParserPreset path resolved by {@link resolveFrom}
9 * @returns path and parserOpts function retrieved from `resolvedParserPreset`
10 */
11export declare const loadParserPreset: (resolvedParserPreset: string) => Promise<Pick<ParserPreset, 'path' | 'parserOpts'>>;
12export interface ResolveExtendsContext {
13 cwd?: string;
14 parserPreset?: string | ParserPreset;
15 prefix?: string;
16 resolve?(id: string, ctx?: {
17 prefix?: string;
18 cwd?: string;
19 }): string;
20 resolveGlobal?: (id: string) => string;
21 dynamicImport?<T>(id: string): T | Promise<T>;
22}
23export default function resolveExtends(config?: UserConfig, context?: ResolveExtendsContext): Promise<UserConfig>;
24export declare function resolveFromSilent(specifier: string, parent: string): string | void;
25/**
26 * @see https://github.com/sindresorhus/resolve-global/blob/682a6bb0bd8192b74a6294219bb4c536b3708b65/index.js#L7
27 */
28export declare function resolveGlobalSilent(specifier: string): string | void;
29//# sourceMappingURL=index.d.ts.map
\No newline at end of file