Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type generation when tsconfig's "incremental" option is true #7352

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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