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




``` Hack
public function addBeforeType(
  Facebook\HackCodegen\CodegenType $type,
): this;
```




## Parameters




+ [` Facebook\HackCodegen\CodegenType `](<class.Facebook.HackCodegen.CodegenType.md>)`` $type ``




## Returns




* ` this `