@ssets/dts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/dist/bundle-generator.cjs +2836 -0
- package/dist/bundle-generator.d.cts +81 -0
- package/dist/bundle-generator.d.ts +81 -0
- package/dist/bundle-generator.js +2801 -0
- package/package.json +32 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
interface CompilationOptions {
|
|
2
|
+
/**
|
|
3
|
+
* EXPERIMENTAL!
|
|
4
|
+
* Allows disable resolving of symlinks to the original path.
|
|
5
|
+
* By default following is enabled.
|
|
6
|
+
* @see https://github.com/timocov/dts-bundle-generator/issues/39
|
|
7
|
+
*/
|
|
8
|
+
followSymlinks?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Path to the tsconfig file that will be used for the compilation.
|
|
11
|
+
*/
|
|
12
|
+
preferredConfigPath?: string;
|
|
13
|
+
}
|
|
14
|
+
interface OutputOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Sort output nodes in ascendant order.
|
|
17
|
+
*/
|
|
18
|
+
sortNodes?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Name of the UMD module.
|
|
21
|
+
* If specified then `export as namespace ModuleName;` will be emitted.
|
|
22
|
+
*/
|
|
23
|
+
umdModuleName?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Enables inlining of `declare global` statements contained in files which should be inlined (all local files and packages from inlined libraries).
|
|
26
|
+
*/
|
|
27
|
+
inlineDeclareGlobals?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Enables inlining of `declare module` statements of the global modules
|
|
30
|
+
* (e.g. `declare module 'external-module' {}`, but NOT `declare module './internal-module' {}`)
|
|
31
|
+
* contained in files which should be inlined (all local files and packages from inlined libraries)
|
|
32
|
+
*/
|
|
33
|
+
inlineDeclareExternals?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Allows remove "Generated by dts-bundle-generator" comment from the output
|
|
36
|
+
*/
|
|
37
|
+
noBanner?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Enables stripping the `const` keyword from every direct-exported (or re-exported) from entry file `const enum`.
|
|
40
|
+
* This allows you "avoid" the issue described in https://github.com/microsoft/TypeScript/issues/37774.
|
|
41
|
+
*/
|
|
42
|
+
respectPreserveConstEnum?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* By default all interfaces, types and const enums are marked as exported even if they aren't exported directly.
|
|
45
|
+
* This option allows you to disable this behavior so a node will be exported if it is exported from root source file only.
|
|
46
|
+
*/
|
|
47
|
+
exportReferencedTypes?: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface LibrariesOptions {
|
|
50
|
+
/**
|
|
51
|
+
* Array of package names from node_modules to inline typings from.
|
|
52
|
+
* Used types will be inlined into the output file.
|
|
53
|
+
*/
|
|
54
|
+
inlinedLibraries?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* Array of package names from node_modules to import typings from.
|
|
57
|
+
* Used types will be imported using `import { First, Second } from 'library-name';`.
|
|
58
|
+
* By default all libraries will be imported (except inlined libraries and libraries from @types).
|
|
59
|
+
*/
|
|
60
|
+
importedLibraries?: string[];
|
|
61
|
+
/**
|
|
62
|
+
* Array of package names from @types to import typings from via the triple-slash reference directive.
|
|
63
|
+
* By default all packages are allowed and will be used according to their usages.
|
|
64
|
+
*/
|
|
65
|
+
allowedTypesLibraries?: string[];
|
|
66
|
+
}
|
|
67
|
+
interface EntryPointConfig {
|
|
68
|
+
/**
|
|
69
|
+
* Path to input file.
|
|
70
|
+
*/
|
|
71
|
+
filePath: string;
|
|
72
|
+
libraries?: LibrariesOptions;
|
|
73
|
+
/**
|
|
74
|
+
* Fail if generated dts contains class declaration.
|
|
75
|
+
*/
|
|
76
|
+
failOnClass?: boolean;
|
|
77
|
+
output?: OutputOptions;
|
|
78
|
+
}
|
|
79
|
+
declare function generateDtsBundle(entries: readonly EntryPointConfig[], options?: CompilationOptions): string[];
|
|
80
|
+
|
|
81
|
+
export { type CompilationOptions, type EntryPointConfig, type LibrariesOptions, type OutputOptions, generateDtsBundle };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
interface CompilationOptions {
|
|
2
|
+
/**
|
|
3
|
+
* EXPERIMENTAL!
|
|
4
|
+
* Allows disable resolving of symlinks to the original path.
|
|
5
|
+
* By default following is enabled.
|
|
6
|
+
* @see https://github.com/timocov/dts-bundle-generator/issues/39
|
|
7
|
+
*/
|
|
8
|
+
followSymlinks?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Path to the tsconfig file that will be used for the compilation.
|
|
11
|
+
*/
|
|
12
|
+
preferredConfigPath?: string;
|
|
13
|
+
}
|
|
14
|
+
interface OutputOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Sort output nodes in ascendant order.
|
|
17
|
+
*/
|
|
18
|
+
sortNodes?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Name of the UMD module.
|
|
21
|
+
* If specified then `export as namespace ModuleName;` will be emitted.
|
|
22
|
+
*/
|
|
23
|
+
umdModuleName?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Enables inlining of `declare global` statements contained in files which should be inlined (all local files and packages from inlined libraries).
|
|
26
|
+
*/
|
|
27
|
+
inlineDeclareGlobals?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Enables inlining of `declare module` statements of the global modules
|
|
30
|
+
* (e.g. `declare module 'external-module' {}`, but NOT `declare module './internal-module' {}`)
|
|
31
|
+
* contained in files which should be inlined (all local files and packages from inlined libraries)
|
|
32
|
+
*/
|
|
33
|
+
inlineDeclareExternals?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Allows remove "Generated by dts-bundle-generator" comment from the output
|
|
36
|
+
*/
|
|
37
|
+
noBanner?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Enables stripping the `const` keyword from every direct-exported (or re-exported) from entry file `const enum`.
|
|
40
|
+
* This allows you "avoid" the issue described in https://github.com/microsoft/TypeScript/issues/37774.
|
|
41
|
+
*/
|
|
42
|
+
respectPreserveConstEnum?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* By default all interfaces, types and const enums are marked as exported even if they aren't exported directly.
|
|
45
|
+
* This option allows you to disable this behavior so a node will be exported if it is exported from root source file only.
|
|
46
|
+
*/
|
|
47
|
+
exportReferencedTypes?: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface LibrariesOptions {
|
|
50
|
+
/**
|
|
51
|
+
* Array of package names from node_modules to inline typings from.
|
|
52
|
+
* Used types will be inlined into the output file.
|
|
53
|
+
*/
|
|
54
|
+
inlinedLibraries?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* Array of package names from node_modules to import typings from.
|
|
57
|
+
* Used types will be imported using `import { First, Second } from 'library-name';`.
|
|
58
|
+
* By default all libraries will be imported (except inlined libraries and libraries from @types).
|
|
59
|
+
*/
|
|
60
|
+
importedLibraries?: string[];
|
|
61
|
+
/**
|
|
62
|
+
* Array of package names from @types to import typings from via the triple-slash reference directive.
|
|
63
|
+
* By default all packages are allowed and will be used according to their usages.
|
|
64
|
+
*/
|
|
65
|
+
allowedTypesLibraries?: string[];
|
|
66
|
+
}
|
|
67
|
+
interface EntryPointConfig {
|
|
68
|
+
/**
|
|
69
|
+
* Path to input file.
|
|
70
|
+
*/
|
|
71
|
+
filePath: string;
|
|
72
|
+
libraries?: LibrariesOptions;
|
|
73
|
+
/**
|
|
74
|
+
* Fail if generated dts contains class declaration.
|
|
75
|
+
*/
|
|
76
|
+
failOnClass?: boolean;
|
|
77
|
+
output?: OutputOptions;
|
|
78
|
+
}
|
|
79
|
+
declare function generateDtsBundle(entries: readonly EntryPointConfig[], options?: CompilationOptions): string[];
|
|
80
|
+
|
|
81
|
+
export { type CompilationOptions, type EntryPointConfig, type LibrariesOptions, type OutputOptions, generateDtsBundle };
|