Skip to content

Commit

Permalink
improve error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbarnum4 committed Aug 18, 2024
1 parent 2cf30c3 commit 2e4a69c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ export class CodeChecker<TypeNames extends string> {
'temp.ts',
`${globalTypes}${code}\n${testCode}`,
this.version
).map(diagnostic => diagnostic.messageText);
).map(diagnostic =>
ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n\n', 2)
);

return {
valid: !messages.length,
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/fixtures2.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// export type AddFunction = FILL_ME_IN;
export type AddFunction = (a: number, b: number) => number;

0 comments on commit 2e4a69c

Please sign in to comment.