Skip to content

Commit

Permalink
fix: added syntactic and semantic diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
gcaaa31928 committed Mar 19, 2024
1 parent 2c90382 commit 11d00cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ export function dtsPlugin(options: PluginOptions = {}): import('vite').Plugin {
entryRoot = entryRoot || publicRoot
entryRoot = ensureAbsolute(entryRoot, root)

const diagnostics = program.getDeclarationDiagnostics()
const diagnostics = [
...program.getDeclarationDiagnostics(),
...program.getSemanticDiagnostics(),
...program.getSyntacticDiagnostics()
]

if (diagnostics?.length) {
logger.error(ts.formatDiagnosticsWithColorAndContext(diagnostics, host))
Expand Down

0 comments on commit 11d00cd

Please sign in to comment.