UNPKG

2.93 kBTypeScriptView Raw
1// Generated by dts-bundle-generator v9.3.1
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 /**
46 * By default all interfaces, types and const enums are marked as exported even if they aren't exported directly.
47 * This option allows you to disable this behavior so a node will be exported if it is exported from root source file only.
48 */
49 exportReferencedTypes?: boolean;
50}
51export interface LibrariesOptions {
52 /**
53 * Array of package names from node_modules to inline typings from.
54 * Used types will be inlined into the output file.
55 */
56 inlinedLibraries?: string[];
57 /**
58 * Array of package names from node_modules to import typings from.
59 * Used types will be imported using `import { First, Second } from 'library-name';`.
60 * By default all libraries will be imported (except inlined libraries and libraries from @types).
61 */
62 importedLibraries?: string[];
63 /**
64 * Array of package names from @types to import typings from via the triple-slash reference directive.
65 * By default all packages are allowed and will be used according to their usages.
66 */
67 allowedTypesLibraries?: string[];
68}
69export interface EntryPointConfig {
70 /**
71 * Path to input file.
72 */
73 filePath: string;
74 libraries?: LibrariesOptions;
75 /**
76 * Fail if generated dts contains class declaration.
77 */
78 failOnClass?: boolean;
79 output?: OutputOptions;
80}
81export declare function generateDtsBundle(entries: readonly EntryPointConfig[], options?: CompilationOptions): string[];
82
83export {};