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

Expose emitFiles #2418

Closed
wants to merge 1 commit into from
Closed

Expose emitFiles #2418

wants to merge 1 commit into from

Conversation

mhegazy
Copy link
Contributor

@mhegazy mhegazy commented Mar 18, 2015

Fixes #2217

@CyrusNajmabadi
Copy link
Contributor

What's the purpose of this? Why not just have people make a program instance and call .emit on that?

@mhegazy
Copy link
Contributor Author

mhegazy commented Mar 19, 2015

There is no way to just emit a file that has been created outside a program. e.g. multiple files combined into one for instance.

@CyrusNajmabadi
Copy link
Contributor

Why are you emitting a file created outside of a program? If you want to do that, just make a program containing that single file and call .emit on it.

In order to emit properly, we need to have the checker results (so we can do things like emit enum references properly). The entity that encapsulates all of this proper management of information and emitting is the Program itself.

@mhegazy mhegazy closed this Apr 14, 2015
@mhegazy mhegazy deleted the exposeEmit branch April 14, 2015 17:34
@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.

Expose emitFiles in the public .d.ts
3 participants