Skip to content

Commit

Permalink
fix(compiler): ignore TS diagnostics on builds where typedef file cha…
Browse files Browse the repository at this point in the history
…nges (#5013)
  • Loading branch information
tanner-reits authored Nov 2, 2023
1 parent 9062e1a commit 2a75b65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compiler/transpile/run-program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ export const runTsProgram = async (
await Promise.all(srcRootDtsFiles);
}

if (config.validateTypes) {
// TODO(STENCIL-540): remove `hasTypesChanged` check and figure out how to generate types before
// executing the TS build program so we don't get semantic diagnostic errors about referencing the
// auto-generated `components.d.ts` file.
if (config.validateTypes && !hasTypesChanged) {
const tsSemantic = loadTypeScriptDiagnostics(tsBuilder.getSemanticDiagnostics());
if (config.devMode) {
tsSemantic.forEach((semanticDiagnostic) => {
Expand Down

0 comments on commit 2a75b65

Please sign in to comment.