Home > @rushstack/terminal > NormalizeNewlinesTextRewriter > ensureNewlineAtEnd
NormalizeNewlinesTextRewriter.ensureNewlineAtEnd property
If true
, then NormalizeNewlinesTextRewriter.close()
will append a newline to the output if it ends with an incomplete line.
Signature:
readonly 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.