-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
55 lines (48 loc) · 1.53 KB
/
index.d.ts
File metadata and controls
55 lines (48 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
declare module 'import-aliases' {
/**
* Options for setting up module aliases
*/
export interface SetupAliasesOptions {
/**
* Path to the config file (defaults to searching for tsconfig.json or jsconfig.json)
*/
configPath?: string;
/**
* Whether to log detailed information (defaults to false)
*/
verbose?: boolean;
/**
* Custom aliases to add regardless of config file
*/
customAliases?: Record<string, string>;
}
/**
* Options for creating a config file with aliases
*/
export interface CreateConfigOptions {
/**
* Type of config file to create ('ts' or 'js')
*/
type?: 'ts' | 'js';
/**
* Source directory for aliases (defaults to 'src')
*/
srcDir?: string;
/**
* Additional aliases to add (e.g. ['@components', '@utils'])
*/
additionalAliases?: string[];
}
/**
* Sets up module aliases based on tsconfig.json, jsconfig.json, or custom configuration
* @param options Configuration options
* @returns The registered aliases
*/
export function setupAliases(options?: SetupAliasesOptions): Record<string, string>;
/**
* Creates a tsconfig.json or jsconfig.json file with common alias configurations
* @param options Configuration options
* @returns Whether the creation was successful
*/
export function createConfigWithAliases(options?: CreateConfigOptions): boolean;
}