Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/terminal > INormalizeNewlinesTextRewriterOptions > ensureNewlineAtEnd

INormalizeNewlinesTextRewriterOptions.ensureNewlineAtEnd property

If true, then NormalizeNewlinesTextRewriter.close() will append a newline to the output if it ends with an incomplete line.

Signature:

ensureNewlineAtEnd?: boolean;

Remarks

If the output is an empty string, then a newline will NOT be appended, because writing an empty string does not produce an incomplete line.