---
layout: docs
title: ensureNewLine
id: class.Facebook.HackCodegen.BaseCodeBuilder.ensureNewLine
docid: class.Facebook.HackCodegen.BaseCodeBuilder.ensureNewLine
permalink: /docs/reference/class.Facebook.HackCodegen.BaseCodeBuilder.ensureNewLine/
---
# Facebook\\HackCodegen\\BaseCodeBuilder::ensureNewLine()




If the cursor is not in a new line, it will insert a line break




``` Hack
final public function ensureNewLine(): this;
```




## Returns




* ` this `