Skip to content

Commit bbeed14

Browse files
committed
Fix constant rebuilds in watch mode
Ref #2844
1 parent 304ddd2 commit bbeed14

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ title: Changelog
1818
- Fixed an issue with `@class` incorrectly handling mapped types, #2842.
1919
- TypeDoc will now consider symbols to be external only if all of their declarations are external
2020
so that declaration merged members with global symbols can be documented, #2844.
21+
- Fixed an issue where TypeDoc would constantly rebuild, #2844.
2122

2223
### Thanks!
2324

src/lib/application.ts

+1-25
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ export class Application extends AbstractComponent<
530530

531531
const host = ts.createWatchCompilerHost(
532532
tsconfigFile,
533-
{},
533+
this.options.fixCompilerOptions({}),
534534
ts.sys,
535535
ts.createEmitAndSemanticDiagnosticsBuilderProgram,
536536
(diagnostic) => this.logger.diagnostic(diagnostic),
@@ -643,30 +643,6 @@ export class Application extends AbstractComponent<
643643
}
644644
};
645645

646-
const origCreateProgram = host.createProgram;
647-
host.createProgram = (
648-
rootNames,
649-
options,
650-
host,
651-
oldProgram,
652-
configDiagnostics,
653-
references,
654-
) => {
655-
// If we always do this, we'll get a crash the second time a program is created.
656-
if (rootNames !== undefined) {
657-
options = this.options.fixCompilerOptions(options || {});
658-
}
659-
660-
return origCreateProgram(
661-
rootNames,
662-
options,
663-
host,
664-
oldProgram,
665-
configDiagnostics,
666-
references,
667-
);
668-
};
669-
670646
const origAfterProgramCreate = host.afterProgramCreate;
671647
host.afterProgramCreate = (program) => {
672648
if (

0 commit comments

Comments
 (0)