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

Do not strip end of file newlines in emit #3287

Closed
uber5001 opened this issue May 27, 2015 · 4 comments
Closed

Do not strip end of file newlines in emit #3287

uber5001 opened this issue May 27, 2015 · 4 comments
Labels
Help Wanted You can do this Suggestion An idea for TypeScript
Milestone

Comments

@uber5001
Copy link

When using tsc, every file output does not have a newline at the end of the file. Is this intended? If so, it would be nice to have a flag to change this behavior.

@danquirk
Copy link
Member

To what end? Can you not put newlines at the end of your source files if there's some need for this in your toolchain? Or are you saying your EOF newlines are getting removed?

@uber5001
Copy link
Author

The original typescript files are formatted with newlines before EOF, and the output es5 files are not.

@danquirk danquirk changed the title Typescript compiler does not add a newline at the end out output files Do not strip end of file newlines in emit May 27, 2015
@danquirk danquirk added the Suggestion An idea for TypeScript label May 27, 2015
@RyanCavanaugh RyanCavanaugh added the In Discussion Not yet reached consensus label Jun 29, 2015
@RyanCavanaugh RyanCavanaugh added Help Wanted You can do this and removed In Discussion Not yet reached consensus labels Aug 5, 2015
@RyanCavanaugh RyanCavanaugh added this to the Community milestone Aug 5, 2015
@RyanCavanaugh
Copy link
Member

Happy to take a PR that patches this up

@jakebailey
Copy link
Member

Just looking at old issues; I tested the emitter on inputs without a trailing newline all the way back to 0.8 and every version has added a trailing newline, so I'm pretty sure this is not a problem (and maybe never was). But if this really is still happening, happy to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants