Skip to content

Commit b72cf3a

Browse files
committed
Generate proper external module declarations instead of ambient ones
dtsGenerator is no longer used to generate the type definitions for this package, it will be removed from the dependencies list in the near future if the "proper external module" format doesn't result in any unforeseen issues. This change also made it necessary to re-introduce the `src` directory for `.ts` source files due to an issue with the TypeScript compiler <microsoft/TypeScript#4667> where TypeScript would attempt to build the `.ts` files in this package while building a project that consumes this package (instead of simply referencing the `.d.ts` files in this package). The workaround for now is to ensure the `.d.ts` files `.ts` files are in separate directories.
1 parent 346f789 commit b72cf3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3466
-376
lines changed

Gruntfile.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = function(grunt) {
77
options: {
88
baseDir: './',
99
name: 'debug-workbench-core-components',
10+
main: 'debug-workbench-core-components/index',
1011
out: './index.d.ts',
1112
excludes: [
1213
'typings/**',
@@ -16,18 +17,14 @@ module.exports = function(grunt) {
1617
},
1718
default: {
1819
src: [
19-
'debug-configuration/debug-configuration.ts',
20-
'debug-toolbar/debug-toolbar.ts',
21-
'file-input/file-input.ts',
22-
'new-debug-config-dialog/new-debug-config-dialog.ts',
23-
'register-element/register-element.ts',
24-
'lib/element-factory.ts'
20+
'src/index.ts'
2521
]
2622
}
2723
},
2824
'tsc': {
2925
options: {
30-
tscPath: path.resolve('node_modules', 'typescript', 'bin', 'tsc')
26+
tscPath: path.resolve('node_modules', 'typescript', 'bin', 'tsc'),
27+
project: './src'
3128
},
3229
default: {}
3330
},
@@ -52,7 +49,7 @@ module.exports = function(grunt) {
5249
},
5350
files: {
5451
// output: input
55-
'dependencies_bundle.html': 'dependencies.html'
52+
'./lib/dependencies_bundle.html': './src/dependencies.html'
5653
}
5754
}
5855
}

debug-configuration/dependencies.html

-4
This file was deleted.

debug-toolbar/dependencies.html

-9
This file was deleted.

file-input/dependencies.html

-4
This file was deleted.

index.d.ts

-292
This file was deleted.

0 commit comments

Comments
 (0)