Skip to content

Commit

Permalink
chore: show more error diagnostics for emitDts
Browse files Browse the repository at this point in the history
closes #2371
  • Loading branch information
dummdidumm committed Sep 1, 2024
1 parent 399ad6a commit 74f3216
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/svelte2tsx/src/emitDts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ export async function emitDts(config: EmitDtsConfig) {
const likely_failed_files = result.diagnostics.filter((diagnostic) => {
// List of errors which hint at a failed d.ts generation
// https://github.com/microsoft/TypeScript/blob/main/src/compiler/diagnosticMessages.json
return diagnostic.code === 2527 || (diagnostic.code >= 4000 && diagnostic.code <= 4108);
return (
diagnostic.code === 2527 ||
diagnostic.code === 5088 ||
diagnostic.code === 2742 ||
(diagnostic.code >= 9005 && diagnostic.code <= 9039) ||
(diagnostic.code >= 4000 && diagnostic.code <= 4108)
);
});

if (likely_failed_files.length > 0) {
Expand Down

0 comments on commit 74f3216

Please sign in to comment.