1 | declare namespace cmdShim {
|
2 | interface Options {
|
3 | /**
|
4 | * If a PowerShell script should be created.
|
5 | *
|
6 | * @default true
|
7 | */
|
8 | createPwshFile?: boolean;
|
9 | /**
|
10 | * If a Windows Command Prompt script should be created.
|
11 | *
|
12 | * @default false
|
13 | */
|
14 | createCmdFile?: boolean;
|
15 | /**
|
16 | * If symbolic links should be preserved.
|
17 | *
|
18 | * @default false
|
19 | */
|
20 | preserveSymlinks?: boolean;
|
21 | /**
|
22 | * The path to the executable file.
|
23 | */
|
24 | prog?: string;
|
25 | /**
|
26 | * The arguments to initialize the `node` process with.
|
27 | */
|
28 | args?: string;
|
29 | /**
|
30 | * The arguments to initialize the target process with, before the actual CLI arguments
|
31 | */
|
32 | progArgs?: string[];
|
33 | /**
|
34 | * The value of the $NODE_PATH environment variable.
|
35 | *
|
36 | * The single `string` format is only kept for legacy compatibility,
|
37 | * and the array form should be preferred.
|
38 | */
|
39 | nodePath?: string | string[];
|
40 | /**
|
41 | * fs implementation to use. Must implement node's `fs` module interface.
|
42 | */
|
43 | fs?: typeof import('fs');
|
44 | }
|
45 | }
|
46 | declare type Options = cmdShim.Options;
|
47 | export = cmdShim;
|
48 | /**
|
49 | * Try to create shims.
|
50 | *
|
51 | * @param src Path to program (executable or script).
|
52 | * @param to Path to shims.
|
53 | * Don't add an extension if you will create multiple types of shims.
|
54 | * @param opts Options.
|
55 | * @throws If `src` is missing.
|
56 | */
|
57 | declare function cmdShim(src: string, to: string, opts?: Options): Promise<void>;
|
58 | declare namespace cmdShim {
|
59 | var ifExists: typeof cmdShimIfExists;
|
60 | }
|
61 | /**
|
62 | * Try to create shims.
|
63 | *
|
64 | * Does nothing if `src` doesn't exist.
|
65 | *
|
66 | * @param src Path to program (executable or script).
|
67 | * @param to Path to shims.
|
68 | * Don't add an extension if you will create multiple types of shims.
|
69 | * @param opts Options.
|
70 | */
|
71 | declare function cmdShimIfExists(src: string, to: string, opts?: Options): Promise<void>;
|
72 | //# sourceMappingURL=index.d.ts.map |
\ | No newline at end of file |