1 | export type ExtensionName = ".cjs" | ".js" | ".json" | ".yaml" | ".yml";
|
2 |
|
3 | export type RequiredOption = "packageJSON" | "defaultExtension" | "cwd";
|
4 |
|
5 | export type Loader = <R extends {}>(fileName: string, supperes: boolean) => R;
|
6 |
|
7 | export type ExtensionLoaderMap = Record<ExtensionName, Loader>;
|
8 |
|
9 | export type PossibleUndefined<T> = T | undefined;
|
10 |
|
11 | export interface rcConfigResult<R extends Record<string, unknown>> {
|
12 | config: R;
|
13 | filePath: string;
|
14 | }
|
15 |
|
16 | export interface rcConfigLoaderOption {
|
17 |
|
18 | packageJSON?:
|
19 | | boolean
|
20 | | {
|
21 | fieldName: string;
|
22 | };
|
23 |
|
24 |
|
25 | configFileName?: string;
|
26 |
|
27 |
|
28 | defaultExtension?: ExtensionName | ExtensionName[];
|
29 |
|
30 |
|
31 | cwd?: string;
|
32 | }
|