Skip to content

Clean up code for getting emitted files#13598

Merged
2 commits merged into
masterfrom
node_modules_bundled_emit
Jan 23, 2017
Merged

Clean up code for getting emitted files#13598
2 commits merged into
masterfrom
node_modules_bundled_emit

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 20, 2017

Fixes #13414
The code for determining whether a file should be emitted appeared a few times. We got it right in one location, so this is really just a refactoring to deduplicate code.

@ghost ghost force-pushed the node_modules_bundled_emit branch from 0aa0a19 to 8886cef Compare January 20, 2017 18:46
@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jan 20, 2017

@sheetalkamat can you take a look.

Comment thread src/compiler/utilities.ts Outdated
/**
* Iterates over each source file to emit.
*/
export function forEachEmittedFile(host: EmitHost, sourceFiles: SourceFile[],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would suggest combining this with forEachExpectedEmitFile instead (eg. taking sourceFiles list as optional input) so as to get rid of duplicate logic here.

sheetalkamat
sheetalkamat approved these changes Jan 23, 2017
@ghost ghost merged commit 6a192ce into master Jan 23, 2017
@ghost ghost deleted the node_modules_bundled_emit branch January 23, 2017 19:48
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
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