Skip to content

Commit

Permalink
Fix type generation when tsconfig's "incremental" option is true (#7352)
Browse files Browse the repository at this point in the history
  • Loading branch information
astegmaier committed Nov 28, 2021
1 parent 5b606ea commit 9d8df49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"composite": true,
"incremental": true
},
"files": [
"index.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/integration-tests/test/ts-types.js
Expand Up @@ -306,7 +306,7 @@ describe('typescript types', function () {
assert(/import\s*{\s*B\s*}\s*from\s*"b";/.test(dist));
});

it('should generate a typescript declaration file even when composite is true', async function () {
it('should generate a typescript declaration file even when composite and incremental are true', async function () {
await bundle(
path.join(__dirname, '/integration/ts-types/composite/index.ts'),
);
Expand Down
Expand Up @@ -36,6 +36,7 @@ export default (new Transformer({
moduleResolution: ts.ModuleResolutionKind.NodeJs,
// createProgram doesn't support incremental mode
composite: false,
incremental: false,
};

let host = new CompilerHost(options.inputFS, ts, logger);
Expand Down

0 comments on commit 9d8df49

Please sign in to comment.