1 | export = init;
|
2 |
|
3 | /**
|
4 | * Import aliases from package.json
|
5 | */
|
6 | declare function init(options?: string | init.Options): void;
|
7 |
|
8 | /**
|
9 | * Exported functoins
|
10 | */
|
11 | declare namespace init {
|
12 | function isPathMatchesAlias(path: string, alias: string): boolean;
|
13 |
|
14 | /**
|
15 | * Register a custom modules directory
|
16 | */
|
17 | function addPath(path: string): void;
|
18 |
|
19 | /**
|
20 | * Register a single alias
|
21 | */
|
22 | function addAlias(alias: string, path: string): void;
|
23 |
|
24 | /**
|
25 | * Register mutliple aliases
|
26 | */
|
27 | function addAliases(aliases: { [alias: string]: string }): void;
|
28 |
|
29 | /**
|
30 | * Reset any changes maded (resets all registered aliases
|
31 | * and custom module directories)
|
32 | * The function is undocumented and for testing purposes only
|
33 | */
|
34 | function reset(): void;
|
35 |
|
36 | /**
|
37 | * module intialis options type
|
38 | */
|
39 | interface Options {
|
40 | base: string;
|
41 | }
|
42 | }
|