Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No emit should happen if there are declaration errors and noEmitOnErrors is specified. #2431

Merged
merged 2 commits into from
Mar 20, 2015

Conversation

CyrusNajmabadi
Copy link
Contributor

No description provided.

function getDeclarationDiagnosticsForFile(sourceFile: SourceFile): Diagnostic[] {
if (!isDeclarationFile(sourceFile)) {
let resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile);
return ts.getDeclarationDiagnostics(getEmitHost(), resolver, sourceFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass an empty writeFile callback so there are no side effects, i.e. emitting the files.

CyrusNajmabadi added a commit that referenced this pull request Mar 20, 2015
No emit should happen if there are declaration errors and noEmitOnErrors is specified.
@CyrusNajmabadi CyrusNajmabadi merged commit 0d2a5bb into master Mar 20, 2015
@CyrusNajmabadi CyrusNajmabadi deleted the noEmitOnErrorCompileOnSave branch March 20, 2015 04:25
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants