UNPKG

2.91 kBTypeScriptView Raw
1// Generated by dts-bundle-generator v5.0.0
2
3export interface CompilationOptions {
4 /**
5 * EXPERIMENTAL!
6 * Allows disable resolving of symlinks to the original path.
7 * By default following is enabled.
8 * @see https://github.com/timocov/dts-bundle-generator/issues/39
9 */
10 followSymlinks?: boolean;
11 /**
12 * Path to the tsconfig file that will be used for the compilation.
13 */
14 preferredConfigPath?: string;
15}
16export interface OutputOptions {
17 /**
18 * Sort output nodes in ascendant order.
19 */
20 sortNodes?: boolean;
21 /**
22 * Name of the UMD module.
23 * If specified then `export as namespace ModuleName;` will be emitted.
24 */
25 umdModuleName?: string;
26 /**
27 * Enables inlining of `declare global` statements contained in files which should be inlined (all local files and packages from inlined libraries).
28 */
29 inlineDeclareGlobals?: boolean;
30 /**
31 * Enables inlining of `declare module` statements of the global modules
32 * (e.g. `declare module 'external-module' {}`, but NOT `declare module './internal-module' {}`)
33 * contained in files which should be inlined (all local files and packages from inlined libraries)
34 */
35 inlineDeclareExternals?: boolean;
36 /**
37 * Allows remove "Generated by dts-bundle-generator" comment from the output
38 */
39 noBanner?: boolean;
40 /**
41 * Enables stripping the `const` keyword from every direct-exported (or re-exported) from entry file `const enum`.
42 * This allows you "avoid" the issue described in https://github.com/microsoft/TypeScript/issues/37774.
43 */
44 respectPreserveConstEnum?: boolean;
45}
46export interface LibrariesOptions {
47 /**
48 * Array of package names from node_modules to inline typings from.
49 * Used types will be inlined into the output file.
50 */
51 inlinedLibraries?: string[];
52 /**
53 * Array of package names from node_modules to import typings from.
54 * Used types will be imported using `import { First, Second } from 'library-name';`.
55 * By default all libraries will be imported (except inlined libraries and libraries from @types).
56 */
57 importedLibraries?: string[];
58 /**
59 * Array of package names from @types to import typings from via the triple-slash reference directive.
60 * By default all packages are allowed and will be used according to their usages.
61 */
62 allowedTypesLibraries?: string[];
63}
64export interface EntryPointConfig {
65 /**
66 * Path to input file.
67 */
68 filePath: string;
69 libraries?: LibrariesOptions;
70 /**
71 * Fail if generated dts contains class declaration.
72 */
73 failOnClass?: boolean;
74 output?: OutputOptions;
75}
76export interface ConfigEntryPoint extends EntryPointConfig {
77 /**
78 * Path of generated d.ts.
79 * If not specified - the path will be input file with replaced extension to `.d.ts`.
80 */
81 outFile?: string;
82 /**
83 * Skip validation of generated d.ts file
84 */
85 noCheck?: boolean;
86}
87export interface BundlerConfig {
88 entries: ConfigEntryPoint[];
89 compilationOptions?: CompilationOptions;
90}
91
92export {};