Skip to content

Commit 74f3216

Browse files
committed
chore: show more error diagnostics for emitDts
closes #2371
1 parent 399ad6a commit 74f3216

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/svelte2tsx/src/emitDts.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ export async function emitDts(config: EmitDtsConfig) {
1818
const likely_failed_files = result.diagnostics.filter((diagnostic) => {
1919
// List of errors which hint at a failed d.ts generation
2020
// https://github.com/microsoft/TypeScript/blob/main/src/compiler/diagnosticMessages.json
21-
return diagnostic.code === 2527 || (diagnostic.code >= 4000 && diagnostic.code <= 4108);
21+
return (
22+
diagnostic.code === 2527 ||
23+
diagnostic.code === 5088 ||
24+
diagnostic.code === 2742 ||
25+
(diagnostic.code >= 9005 && diagnostic.code <= 9039) ||
26+
(diagnostic.code >= 4000 && diagnostic.code <= 4108)
27+
);
2228
});
2329

2430
if (likely_failed_files.length > 0) {

0 commit comments

Comments
 (0)