Skip to content

Commit

Permalink
Handle --out with declaration to get only diagnostics from single file.
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed Apr 26, 2024
1 parent 4e0a867 commit 4e20c4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/transformers/declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,13 @@ import {
/** @internal */
export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined {
const compilerOptions = host.getCompilerOptions();
const files = filter(getSourceFilesToEmit(host, file), isSourceFileNotJson);
const result = transformNodes(
resolver,
host,
factory,
compilerOptions,
filter(getSourceFilesToEmit(host, file), isSourceFileNotJson),
file ? contains(files, file) ? [file] : emptyArray : files,
[transformDeclarations],
/*allowDtsFiles*/ false,
);
Expand Down

0 comments on commit 4e20c4e

Please sign in to comment.