source: trip-planner-front/node_modules/lilconfig/dist/index.d.ts@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.5 KB
Line 
1export declare type LilconfigResult = null | {
2 filepath: string;
3 config: any;
4 isEmpty?: boolean;
5};
6interface OptionsBase {
7 stopDir?: string;
8 searchPlaces?: string[];
9 ignoreEmptySearchPlaces?: boolean;
10 packageProp?: string | string[];
11}
12export declare type Transform = TransformSync | ((result: LilconfigResult) => Promise<LilconfigResult>);
13export declare type TransformSync = (result: LilconfigResult) => LilconfigResult;
14declare type LoaderResult = any;
15export declare type LoaderSync = (filepath: string, content: string) => LoaderResult;
16export declare type Loader = LoaderSync | ((filepath: string, content: string) => Promise<LoaderResult>);
17export declare type Loaders = Record<string, Loader>;
18export declare type LoadersSync = Record<string, LoaderSync>;
19export interface Options extends OptionsBase {
20 loaders?: Loaders;
21 transform?: Transform;
22}
23export interface OptionsSync extends OptionsBase {
24 loaders?: LoadersSync;
25 transform?: TransformSync;
26}
27export declare const defaultLoaders: LoadersSync;
28declare type AsyncSearcher = {
29 search(searchFrom?: string): Promise<LilconfigResult>;
30 load(filepath: string): Promise<LilconfigResult>;
31};
32export declare function lilconfig(name: string, options?: Partial<Options>): AsyncSearcher;
33declare type SyncSearcher = {
34 search(searchFrom?: string): LilconfigResult;
35 load(filepath: string): LilconfigResult;
36};
37export declare function lilconfigSync(name: string, options?: OptionsSync): SyncSearcher;
38export {};
Note: See TracBrowser for help on using the repository browser.